MediaRecorder-video-key-frame-distance.html (1376B)
1 <!doctype html> 2 <html> 3 <head> 4 <title>MediaRecorder Stop</title> 5 <link rel="help" href="https://w3c.github.io/mediacapture-record/MediaRecorder.html#mediarecorder"> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <script src="utils/sources.js"></script> 9 </head> 10 <body> 11 <script> 12 promise_test(async t => { 13 const {stream: video} = createVideoStream(t); 14 let videoKeyFrameIntervalDurationUsed = false; 15 var options = { 16 get videoKeyFrameIntervalDuration() { 17 videoKeyFrameIntervalDurationUsed = true; 18 return 1000; 19 } 20 } 21 const recorder = new MediaRecorder(video, options); 22 assert_true(videoKeyFrameIntervalDurationUsed); 23 }, "MediaRecorder interprets videoKeyFrameIntervalDuration"); 24 25 promise_test(async t => { 26 const {stream: video} = createVideoStream(t); 27 let videoKeyFrameIntervalCountUsed = false; 28 var options = { 29 get videoKeyFrameIntervalCount() { 30 videoKeyFrameIntervalCountUsed = true; 31 return 5; 32 } 33 } 34 const recorder = new MediaRecorder(video, options); 35 assert_true(videoKeyFrameIntervalCountUsed); 36 }, "MediaRecorder interprets videoKeyFrameIntervalCount"); 37 </script> 38 </body> 39 </html>