Problemas para reproducir video con MediaElement y HLS

  • Autor Autor Agustinn
  • Fecha de inicio Fecha de inicio
A

Agustinn

Beta
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Bueno, les comento que estoy tratando de imitar a la pagina HTML5 MediaElement - HLS , pero copio el codigo para utilizarlo y no logro que pueda funcionar.

El codigo es el siguiente:

Insertar CODE, HTML o PHP:
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>HTML5 MediaElement - HLS</title>	
	
	<script src="http://fatstone.tv/wp-content/plugins/fatstonetv/hls/mediaelement/build/jquery.js"></script>	
	<script src="http://fatstone.tv/wp-content/plugins/fatstonetv/hls/mediaelement/build/mediaelement-and-player.min.js"></script>
	<link rel="stylesheet" href="http://fatstone.tv/wp-content/plugins/fatstonetv/hls/mediaelement/build/mediaelementplayer.min.css" />
</head>
<style>
#box {
	width: 100px;
	height: 100px;
	background: red;
}
body {
	overflow: hidden;
}
</style>
<body>


<video width="600" height="300" id="player1">
<!-- <video id="player1"> -->
    
    <!-- Pseudo HTML5 -->
    <source type="application/x-mpegURL" src="http://fatstone-hls-live.telenorcdn.net/fatstone/fatstonetv/fatstone.m3u8" />

</video>


<script>

$(document).ready(function() {
	
/* var div = document.getElementsByClassName('content-area'); */
/* var width = div.offsetWidth; */
/* var width = parent.document.body.getElementsByClassName('content-area')[0].offsetWidth; */
/* console.log('widthj: ', width); */

var player = new MediaElementPlayer('video', {
   
/*    defaultVideoWidth: 640, */
/*    defaultVideoHeight: 360, */
/*    pluginWidth: 640, */
/*    pluginHeight: 360, */
   
    // method that fires when the Flash or Silverlight object is ready
    success: function (mediaElement, domObject) { 
         
        // call the play method
        mediaElement.play();
         
    },
    // fires when a problem is detected
    error: function () { 
     
    }
});

});

</script>

</body>
</html>
desde ya, les agradezco su ayuda!
 
Eso es un plugin pero no creo que te funcione ya que no tienes las demás funciones del plugin como el código y eso?

Además que copiando y pegando jamás va a funcionar, creo que necesitas tener el plugin para tener todo la funcionalidad de el.
 
Acabo de entrar y me reproduce normalmente!
 
si, el plugin es mediaelementjs.com, lo alojo en mi servidor y adapto el codigo para que tome el script desde mi servidor pero no funciona...

osea, la pagina fastone.tv no es mia, pero si quiero poner ese video en una pagina mia no funciona...
si en vez de utilizar mediaelementjs utilizo jwplayer funciona correctamente, pero no puedo visualizar el video desde un smartphone

- - - Actualizado - - -

O capaz tienen algun otro plugin que funcione, la idea es poder ver este link http://fatstone-hls-live.telenorcdn.net/fatstone/fatstonetv/fatstone.m3u8, desde un reproductor web que funcione tanto en las pc como en los celulares...
 
Atrás
Arriba