| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>request-video-frame-seek</title> |
| <script src="video-test.js"></script> |
| <script src="media-file.js"></script> |
| <script> |
| window.addEventListener('load', async event => { |
| findMediaElement(); |
| |
| run('video.src = findMediaFile("video", "content/test")'); |
| |
| await waitFor(video, 'canplaythrough'); |
| |
| let videoFramePromise = new Promise((resolve, reject) => { |
| consoleWrite('RUN(video.requestVideoFrameCallback(callback))'); |
| video.requestVideoFrameCallback(resolve); |
| }); |
| |
| run('video.currentTime = 0.5'); |
| |
| await shouldResolve(videoFramePromise); |
| |
| endTest(); |
| }); |
| </script> |
| </head> |
| <body> |
| <video muted></video> |
| </body> |
| </html> |