Created
January 22, 2015 17:46
-
-
Save andrewn/0c56b59bebc98c92da20 to your computer and use it in GitHub Desktop.
HLS mediaplayerelement
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> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>HTML5 MediaElement - HLS</title> | |
<script src="../build/jquery.js"></script> | |
<script src="../build/mediaelement-and-player.min.js"></script> | |
<link rel="stylesheet" href="../build/mediaelementplayer.min.css" /> | |
</head> | |
<body> | |
<h1>MediaElementPlayer.js</h1> | |
<h2>HLS Wrapper</h2> | |
<video width="640" height="360" id="player1"> | |
<!-- Pseudo HTML5 --> | |
<source type="application/x-mpegURL" src="!!HLS STREAM HERE!!" /> | |
</video> | |
<script> | |
$('video').mediaelementplayer({ | |
success: function(media, node, player) { | |
$('#' + node.id + '-mode').html('mode: ' + media.pluginType); | |
} | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment