Created
July 14, 2020 10:41
-
-
Save dbiesecke/9812064fc380f4d46d918443d3d39764 to your computer and use it in GitHub Desktop.
MPEGTS JavaScript Player
This file contains hidden or 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 src="https://cdn.jsdelivr.net/npm/jsmpeg-player@3/build/jsmpeg-player.min.js"></script> | |
<script> | |
function testStream() { | |
var videoUrl = document.getElementById("myinput").value; | |
new JSMpeg.VideoElement('#videoWrapper', videoUrl); | |
} | |
</script> | |
</head> | |
<body> | |
<input id="myinput" type="text" name="query" class="form-control" placeholder="url"></input> | |
<button onclick="testStream()">Test</button> | |
<div id="videoWrapper"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment