insertar codigo html y/o embeber en tu sitio web video streaming m3u8 o rtmp

Tema en 'GNU/Linux' comenzado por MikrotikPeru, 27 de Febrero de 2017.

  1. MikrotikPeru

    MikrotikPeru Well-Known Member

    Para RTMP:

    HTML:
    <html>
    <head>
      <title>Your Website Title</title>
    </head>
    <body>

    <script type='text/javascript' src='http://mikrotik.com.pe/libstreaming/jwplayer.js'></script>

    <div id='player_preview'>
      <video id='video_tag' width='100% 'height='480' controls autoplay>
        <source src='http://167.114.170.28:1935/live/streaming1/index.m3u8' type='video/mp4'>
        Tu navegador no soporta <a href='http://www.mikrotikperu.pe'>MikrotikPeru</a>
      </video>
      <a href='rtsp://167.114.170.28:1935/live/streaming1' id='android_firefox' style='display:none;'> Mire este stream sobre RTSP para Android Mozilla</a>
    </div>


    <script type='text/javascript'>
      if (navigator.userAgent.match(/Android/i) && navigator.userAgent.match(/Firefox/i) )
      { document.getElementById('android_firefox').style.display = '';
         document.getElementById('video_tag').style.display = 'none';
       }
      jwplayer('player_preview').setup({
        playlist: [{
          sources: [
           {file:'rtmp://167.114.170.28:1935/live/streaming1',},
          ]
         }],
         height: 480,
         width: '100%',
         fallback: false,
         repeat: true,
         autostart: true,
         primary: 'flash',
         stretching: 'uniform'
      });
    </script>



    </body>
    </html>

    Para M3U8
    HTML:
    <!DOCTYPE html>
    <html lang="en">
    <head>
       
        <script data-cfasync="false" src="http://www.mikrotik.com.pe/libstreaming/jwplayer2.js"></script>
    </head>
    <body>
     

          <object type="application/x-shockwave-flash" data="http://www.mikrotik.com.pe/libstreaming/jwplayer.flash.swf" width="100%" height="100%" bgcolor="#000000" id="5000" class="jwswf swfPrev-beforeswfanchor0 swfNext-afterswfanchor0" tabindex="0">
             <param name="allowfullscreen" value="true">
             <param name="allowscriptaccess" value="always">
             <param name="seamlesstabbing" value="true">
             <param name="wmode" value="opaque">
           </object>

         


      <script data-cfasync="false" type="text/javascript">
        jwplayer('5000').setup({
        file: 'http://167.114.170.28:1935/live/streaming1/playlist.m3u8',
        file: 'http://167.114.170.28:1935/live/streaming1/playlist.m3u8',
            aboutlink: 'http://skysports.com',
            controls: 'true',
            title: 'Football Live Streamings.Com',
            width: '100%',
            height: '490',
            stretching: 'uniform',
            autostart: 'true',
            primary: 'flash',
            skin: 'vapor',
            androidhls: 'true',    
        });
      </script>

    </body>

    </html>
     

Comparte esta página