【问题标题】:How do i embed this m3u8 into jw player我如何将此 m3u8 嵌入到 jw 播放器中
【发布时间】:2013-02-05 22:28:35
【问题描述】:

这里是新手,所以如果您能耐心等待我,我真的很感激。

现在我有了这个网址

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

我想把它嵌入到我的 JW 播放器中,我有 JW 播放器 5 和 6 所以不管是最简单的,有人可以帮助兄弟吗?我需要什么代码来嵌入它,以便它在 JW 播放器上播放如果可能的话.

如果你能写出完整的代码,那么我就可以理解因为我在这里说的是一个完全的新手,但学习速度很快,哈哈。

大家好

更新:

好的,所以我有一些小技巧,然后环顾四周想出了这个代码:

<script type='text/javascript' src='jwplayer2/jwplayer.js'></script>

<div id='mediaplayer'></div>

<script type="text/javascript">
jwplayer('mediaplayer').setup({
'id': 'playerID',
'width': '480',
'height': '270',
'file': 'http://213.202.73.8:1234/data/channels/ARENA1. m3u8',
'image': '/thumbs/bunny.jpg',
'modes': [
{type: 'html5'},
{type: 'flash', src: 'player.swf'},
{type: 'download'}
]
});
</script>

所以它在 safari 中运行得很好,但在 chrome、IE 或 Firefox 中却不行不会绕过它试图加载一些东西,但在播放器中什么也没有。

大家好

更新 2:

如果它是指向该站点的链接,则为:http://testersite.byethost22。 com/test.html

更新 3:

我也试过另一个,这次它说“视频无法加载,可能是因为服务器或网络失败,或者因为格式不受支持:”http://video.popler.tv:554/publishlive /4funtv/playlist.m3u8"

您可以在此处查看:http://testersite.byethost22。 com/u。 html 它只在 safari 中这样说,与以前的 chrome 等问题相同,但现在当我点击 chrome 中的播放器时,它只是下载了一个 playlist.m3u8

希望有人能帮忙,干杯

更新 4:

好的,如果你去这里:http://testersite.byethost22.com/test5.html 并尝试用 idevice 玩它,你会发现它运行良好,但在我的电脑上使用 chrome、firefox 时它根本无法运行,如果有人可以帮助我,我现在很绝望让它在 chrome 和 firefox 上工作,我会很开心,很快乐!正如我所说,jwp5 或 jwp6 都可以,只要它适用于 chrome 和 firefox,我真的不介意。 谢谢大家,请有人帮助大声笑,是的,我知道某些网址中存在空白,但我不得不这样做,因为我没有足够的声誉点来发布超过 2 个链接。

【问题讨论】:

    标签: jwplayer m3u8


    【解决方案1】:

    您在此处使用的是 JW Player 5,它不支持桌面上的 HLS (M3U8)(在 Flash 中)。只有 JW6 Premium 支持此功能。这是一个演示 - http://www.longtailvideo.com/support/jw-player/29393/hls-adaptive-stream

    更新,这里是代码,不过它只适用于 JW6 Premium:

    <div id="myElement"></div>
    
    <script>
        jwplayer("myElement").setup({
          image: "/uploads/myPoster.jpg",
          file: "/uploads/myManifest.m3u8",
        });
    </script>
    

    【讨论】:

    【解决方案2】:

    实际上 JW Player 6 广告版支持 M3U8,它说是广告版,但没有显示广告,你把这个播放器放在你的 .html 文件中或者你想让这个播放器播放你的直播流或 m3u8 播放列表的任何地方,这里是代码我编译:

    <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>
    

    【讨论】:

    • 请格式化答案,因为它对目标受众有意义。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-14
    • 2012-02-08
    • 2013-02-03
    • 1970-01-01
    • 2014-04-01
    • 2014-11-19
    相关资源
    最近更新 更多