test_peerConnection_stats.html (1266B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <script type="application/javascript" src="pc.js"></script> 5 <script type="application/javascript" src="stats.js"></script> 6 </head> 7 <body> 8 <pre id="test"> 9 <script type="application/javascript"> 10 createHTML({ 11 bug: "1337525", 12 title: "webRtc Stats composition and sanity" 13 }); 14 15 runNetworkTest(async function (options) { 16 // We don't know how to get QP value when using Android system codecs. 17 if (navigator.userAgent.includes("Android")) { 18 await pushPrefs(["media.navigator.mediadatadecoder_vpx_enabled", false], 19 ["media.webrtc.hw.h264.enabled", false]); 20 } 21 22 // For accurate comparisons of `remoteTimestamp` (not using reduced precision) 23 // to `timestamp` (using reduced precision). 24 await pushPrefs(["privacy.resistFingerprinting.reduceTimerPrecision.jitter", 25 false]); 26 27 const test = new PeerConnectionTest(options); 28 29 test.chain.insertAfter("PC_LOCAL_WAIT_FOR_MEDIA_FLOW", 30 [PC_LOCAL_TEST_LOCAL_STATS]); 31 32 test.chain.insertAfter("PC_REMOTE_WAIT_FOR_MEDIA_FLOW", 33 [PC_REMOTE_TEST_REMOTE_STATS]); 34 35 test.setMediaConstraints([{audio: true}, {video: true}], 36 [{audio: true}, {video: true}]); 37 await test.run(); 38 }); 39 </script> 40 </pre> 41 </body> 42 </html>