test_getUserMedia_playVideoAudioTwice.html (727B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <script type="application/javascript" src="mediaStreamPlayback.js"></script> 5 </head> 6 <body> 7 <pre id="test"> 8 <script type="application/javascript"> 9 createHTML({title: "getUserMedia Play Video and Audio Twice", bug: "822109" }); 10 /** 11 * Run a test that we can complete a video playback cycle twice in a row. 12 */ 13 runTest(function () { 14 return getUserMedia({video: true, audio: true}).then(stream => { 15 var testVideo = createMediaElement('video', 'testVideo'); 16 var playback = new MediaStreamPlayback(testVideo, stream); 17 18 return playback.playMediaWithoutStoppingTracks(false) 19 .then(() => playback.playMedia(true)); 20 }); 21 }); 22 23 </script> 24 </pre> 25 </body> 26 </html>