| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <title>volume-active-audio-session</title> |
| <script src="video-test.js"></script> |
| <script src="media-file.js"></script> |
| <script> |
| async function runTest() { |
| testExpected('internals.audioSessionActive()', false); |
| findMediaElement(); |
| run('video.volume = 0'); |
| run('video.src = findMediaFile("audio", "content/silence")'); |
| await run('video.play()'); |
| testExpected('internals.audioSessionActive()', false); |
| run('video.volume = 1'); |
| await testExpectedEventually('internals.audioSessionActive()', true, '==', 1000); |
| } |
| |
| window.addEventListener('load', event => { |
| runTest().then(endTest).catch(failTest); |
| }) |
| </script> |
| </head> |
| <body> |
| <video controls playsinline loop></video> |
| </body> |
| </html> |