Skip to content

Commit

Permalink
Let sender sends some media data so that getStats produce some outbou…
Browse files Browse the repository at this point in the history
…nd rtp related stats
  • Loading branch information
youennf committed Nov 4, 2018
1 parent 72fa5dd commit af0b381
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webrtc/RTCRtpSender-getStats.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@
t.add_cleanup(() => caller.close());
const callee = new RTCPeerConnection();
t.add_cleanup(() => callee.close());
const { sender } = caller.addTransceiver('audio');

const stream = await getNoiseStream({audio:true});
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
const [track] = stream.getTracks();
const { sender } = caller.addTransceiver(track);

await doSignalingHandshake(caller, callee);
const statsReport = await sender.getStats();
Expand Down

0 comments on commit af0b381

Please sign in to comment.