| <title>audio-playback-restriction</title> |
| <script src=media-file.js></script> |
| <script src=video-test.js></script> |
| video = document.getElementsByTagName('audio')[0]; |
| run('internals.setMediaElementRestrictions(video, "RequireUserGestureForAudioRateChange")'); |
| waitForEventAndFail('error'); |
| waitForEvent('canplaythrough', canplaythrough); |
| run('video.src = findMediaFile("audio", "content/test")'); |
| function canplaythrough() |
| waitForEvent('playing', playing); |
| waitForEventAndFail('pause'); |
| runWithKeyDown('video.muted = false'); |
| setTimeout(endTest, 250); |
| <body onload="runTest()"> |
| <p>Test that when RequireUserGestureForAudioRateChange is set, setting muted with a user gesture clears the restriction.</p> |
| <audio muted controls></audio> |