How do i embed this m3u8 into jw player

后端 未结 2 1334
悲&欢浪女
悲&欢浪女 2020-12-14 12:51

Total novice here so if you can be patient with me id really appreciate it.

Now i have this url

http://213.202.73.8:1234/data/channels/ARENA1. m3u8
         


        
相关标签:
2条回答
  • 2020-12-14 13:37

    Actually JW Player 6 Ads edition supports M3U8 and it says ads edition but no ads are displayed,you put this player in your .html file or wherever you want this player to play your live streams or m3u8 playlist, here are the codes i compiled:

    <head>
        <style>*{margin:0;padding:0;}</style>
        <script data-cfasync="false" src="http://jwpsrv.com/library/SakQCEfSEeOHhRIxOQfUww.js"></script>
    </head>
    <body>
       <div id="playerjxJRqLMFuJaA_wrapper" style="position: relative; display: block; width: 100%; height: 490px;">
          <a id="beforeswfanchor0" href="#playerjxJRqLMFuJaA" tabindex="0" title="Flash start" style="border:0;clip:rect(0 0 0 0);display:block;height:1px;margin:-1px;outline:none;overflow:hidden;padding:0;position:absolute;width:1px;" data-related-swf="playerjxJRqLMFuJaA"></a>
    
          <object type="application/x-shockwave-flash" data="http://p.jwpcdn.com/6/12/jwplayer.flash.swf" width="100%" height="100%" bgcolor="#000000" id="playerjxJRqLMFuJaA" name="playerjxJRqLMFuJaA" 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>
    
           <a id="afterswfanchor0" href="#playerjxJRqLMFuJaA" tabindex="0" title="Flash end" style="border:0;clip:rect(0 0 0 0);display:block;height:1px;margin:-1px;outline:none;overflow:hidden;padding:0;position:absolute;width:1px;" data-related-swf="playerjxJRqLMFuJaA"></a>
    
           <div id="playerjxJRqLMFuJaA_aspect" style="display: none;">
           </div>
    
           <div id="playerjxJRqLMFuJaA_jwpsrv" style="position: absolute; top: 0px; z-index: 10;"><div class="afs_ads" style="width: 1px; height: 1px; position: absolute; background: transparent;">&nbsp;
           </div>
        </div>
    
      <script data-cfasync="false" type="text/javascript">
        jwplayer('playerjxJRqLMFuJaA').setup({
        file: 'http://proxy-031.dc3.dailymotion.com/sec(11eb80ed8bb344d448fb7eff4cafbe08)/video/754/581/309185457_mp4_h264_aac_hd_hfr.m3u8',
        file: 'http://proxy-031.dc3.dailymotion.com/sec(11eb80ed8bb344d448fb7eff4cafbe08)/video/754/581/309185457_mp4_h264_aac_hd_hfr.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>
    
    0 讨论(0)
  • 2020-12-14 13:49

    You are using JW Player 5 here, which does not support HLS (M3U8) on desktops (in Flash). Only JW6 Premium supports this. Here is a demo - http://www.longtailvideo.com/support/jw-player/29393/hls-adaptive-stream

    Update, here is the code, it only works in JW6 Premium though:

    <div id="myElement"></div>
    
    <script>
        jwplayer("myElement").setup({
          image: "/uploads/myPoster.jpg",
          file: "/uploads/myManifest.m3u8",
        });
    </script>
    
    0 讨论(0)
提交回复
热议问题