<link rel="stylesheet" href="//releases.flowplayer.org/7.0.4/commercial/skin/skin.css"> <style> </style> <script src="//code.jquery.com/jquery-1.12.4.min.js"></script> <script src="//releases.flowplayer.org/7.0.4/commercial/flowplayer.min.js"></script> <script src="//releases.flowplayer.org/hlsjs/flowplayer.hlsjs.min.js"></script> <script> flowplayer(function (api) { api.on("load", function (e, api, video) { $("#vinfo").text(api.engine.engineName + " engine playing " + video.type); }); }); </script> <div class="flowplayer fixed-controls no-toggle no-time play-button obj" style=" width: 85.5%; height: 80%; margin-left: 7.2%; margin-top: 6%; z-index: 1000;" data-key="$812975748999788" data-live="true" data-share="false" data-ratio="0.5625" data-logo=""> <video autoplay="true" stretch="true"> <source type="application/x-mpegurl" src="http://live.wmncdn.net/safaritv2/live2.stream/index.m3u8"> </video> </div>Hola amigos, ¿cómo puedo agregar este script de reproducción automática?
Encontré este guión de esta conversación.
Sinceramente, no conozco jQuery, gracias por ayudarme. Llevo 6 horas trabajando, pero no pude. :)
Te doy un código de muestra para tu referencia:
$( document ).ready(()=>{ let player= videojs('hls-example', {autoplay:true,controls:true,liveui:true,muted:true}); } ); <html> <head> <link href="https://vjs.zencdn.net/7.18.1/video-js.css" rel="stylesheet" /> <script src="https://vjs.zencdn.net/7.18.1/video.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> </head> <body> <video class="video-js vjs-big-play-centered" id='hls-example' width="300" height="200"> <source src="https://cph-p2p-msl.akamaized.net/hls/live/2000341/test/master.m3u8" type="application/x-mpegURL"> </video> </body> </html>