24/04/2015, 06:26
|
| | Fecha de Ingreso: julio-2010
Mensajes: 12
Antigüedad: 14 años, 4 meses Puntos: 0 | |
Respuesta: Reproducir m3u8 Hola franciscomarin
Este es el código de una de las opciones que estoy usando:
<!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>
<script src="testforfiles.js"></script>
<link rel="stylesheet" href="../build/mediaelementplayer.min.css" />
</head>
<body>
<h1>MediaElementPlayer.js</h1>
<h2>HLS Wrapper</h2>
<code><pre>
<video width="640" height="360" id="player1" preload="none">
<!-- Pseudo HTML5 -->
<source type="application/x-mpegURL" src="http://200.76.77.237/LIVE/H01/CANAL435/PROFILE03.m3u8" />
</video>
</pre></code>
<video width="640" height="360" id="player1">
<!-- Pseudo HTML5 -->
<source type="application/x-mpegURL" src="http://200.76.77.237/LIVE/H01/CANAL435/PROFILE03.m3u8" />
</video>
<span id="player1-mode"></span>
<h3> Test Videos </h3>
<div> The following videos should stream correctly. Each time an
issue is reported with a sample playlist, it will be added in the list
and verified after bugfixing </div>
<ul id="streamlist">
</ul>
Check with your own Playlist ! <a href="http://kb2.adobe.com/cps/142/tn_14213.html">beware of Cross Domain Policy</a><br>
<input id="userInput" value="http://200.76.77.237/LIVE/H01/CANAL435/PROFILE03.m3u8?" size="80"> <button onclick="userSubmit()">Load and Play</button><br>
<p>
<script type="text/javascript" src="hls_streams.js"></script>
<script type="text/javascript">
function listStreams(list, container) {
for(var i=0; i<list.length; i++) { var entry = document.createElement("li");
entry.innerHTML = "<a href='#' onclick='return loadStream(\""+list[i].file+"\")'>"+list[i].title+"</a>";
document.getElementById(container).appendChild(ent ry);
}
}
listStreams(teststreams, "streamlist");
function userSubmit() {
loadStream(document.getElementById('userInput').va lue);
}
function loadStream(url) {
$('video')[0].player.setSrc(url);
$('video')[0].player.play();
}
</script>
<script>
$('video').mediaelementplayer({
success: function(media, node, player) {
$('#' + node.id + '-mode').html('mode: ' + media.pluginType);
}
});
</script>
</body>
</html>
Tengo con sus archivos y lo mismo con jwplayer 6 pro, video-js, flowplayer y GrindPlayer y nada de nada.
Saludos. |