我如何将M3U8嵌入到JW播放器中 [英] How do i embed this m3u8 into jw player

查看:168
本文介绍了我如何将M3U8嵌入到JW播放器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里有新手,所以如果您对我有耐心的话,我会非常感激.

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

现在我有这个网址

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

我想将其嵌入到我的JW Player中,我同时拥有Jw Player 5和Amp; 6因此,最简单的方法是,有人可以帮忙一个兄弟吗?我需要嵌入什么代码,以便在可能的情况下在JW Player上播放.

I want to embed this into my JW Player, I have both Jw Player 5 & 6 So whatever is easiest, Can someone help a brother out and what code would i need to embed this so it plays on the JW Player if possible.

如果您可以编写FULL代码,那么我就可以理解coz了,就像我在这里说的是一个新手,但是学习者很快.

If you could write the FULL code so i can understand coz as i said a total novice here but fast learner lol.

干杯们

更新:

好吧,所以我在周围摆弄了些小玩意儿,然后看了看下面的代码:

Ok so i have had a little fiddle around and after have a look around came up with this code:

<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中工作,关于为什么的任何想法,当我用这些浏览器单击播放按钮时,什么也没发生,只是不将计时器类型的东西加载到播放器中间不会尝试加载某些内容,但在播放器中什么也没笑.

So it works in safari brilliantly but not in chrome, IE, or Firefox, Any ideas as to why, When i click the play button with those browsers nothing happens simply just doesnt load the timer type thing in the middle of the player doesnt go around its trying to load something but nothing in the player lol.

干杯们

更新2:

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

If its a link to the site here it is: http://testersite.byethost22. com/test.html

更新3:

我也尝试了另一种方法,这一次它说由于服务器或网络故障或由于不支持该格式而无法加载视频:" http://video.popler.tv:554/publishlive /4funtv/playlist.m3u8"

Ive also tried another one and this time it says "The video could not be loaded, either because the server or network failed or because the format is not supported:"http: //video.popler.tv:554/publishlive/4funtv/playlist.m3u8"

您可以在这里看到此内容:http://testersite.byethost22. com/u. html它只在Safari中说了这一点,与以前使用chrome等存在相同的问题,但是现在当我单击chrome中的播放器时,它只是下载了一个播放列表.m3u8

You can see this here: http:// testersite.byethost22. com/u. html It says this in safari only though, same problem as before with chrome etc but now when i click on the player in chrome it simply downloads a playlist.m3u8

希望有人可以帮助,干杯

Hope someone can help, Cheers

更新4:

好吧,如果你去这里: http://testersite.byethost22.com/test5.html 并尝试使用idevice播放它,您会看到它运行正常,但是在我的PC上使用chrome,firefox时,它根本无法正常工作,现在我非常绝望,如果有人可以帮助我在chrome和firefox上运行它,我会发狂并感到非常高兴男人!!正如我说的那样,只要是适用于chrome和firefox的jwp5或jwp6都可以,我真的不介意. 谢谢大家,请有人帮助大声笑,是的,我知道某些网址中存在空白,但是我必须那样做,因为我没有足够的声誉点来发布两个以上的链接.

Ok so if you go here: http://testersite.byethost22.com/test5.html and try and play it with an idevice you will see it works perfectly but using chrome, firefox on my pc it simply does not work, im desperate now guys if someone can help me get this working on chrome and firefox i would be estastic and a very happy happy man!! as i said either would be fine jwp5 or jwp6 so as long as it works on chrome and firefox i really dont mind. Thanks guys and please someone help lol and yes i know theres gaps in some of the urls but i had to do it like that as i dont have enough reputation points to post more than 2 links.

推荐答案

您在这里使用的JW Player 5不支持台式机(在Flash中)的HLS(M3U8).仅JW6 Premium支持此功能.这是一个演示- http://www.longtailvideo.com/support/jw-player/29393/hls-adaptive-stream

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

更新,以下是代码,尽管如此,它仅在JW6 Premium中起作用:

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>

这篇关于我如何将M3U8嵌入到JW播放器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆