gecko-dev/dom/media/test/crashtests/media-element-source-seek-1...

28 строки
796 B
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<script>
var audioElement = document.createElement("audio");
audioElement.autoplay = true;
audioElement.src = "sound.ogg";
audioElement.onplaying =
function() {
audioElement.onplaying = null;
setTimeout(
function() {
audioElement.onseeked =
function() {
// Note we reset 'src' to release decoder resources and cubeb
// streams to prevent OOM or OpenCubeb() failures.
audioElement.src = "";
document.documentElement.removeAttribute("class");
};
audioElement.currentTime = 0;
}, 100);
};
var context = new window.AudioContext();
var source = context.createMediaElementSource(audioElement);
source.connect(context.destination);
</script>
</html>