jwplayer hls标签无法正常工作

时间:2016-04-05 11:33:36

标签: jwplayer jwplayer6 jwplayer7

我已经创建了HLS流媒体,除了标签之外它对我工作正常,我添加了自定义hls标签,但它不适合我,这里是我的js

jwplayer.key = "**********";    
jwplayer("container").setup({
    file: "Videos_38_1200_1459854139607.m3u8", 
    image: "************",
    primary: 'flash',
    hlslabels:{
           "2000":"1080p",
           "1400":"720p",
           "1000":"480p",
           "600":"360p",
           "460":"240p",
    }
});   

m3u8文件

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1173000,RESOLUTION=1024x768,CODECS="avc1.4d001f,mp4a.40.2"
Videos/Streaming/hls1080m_Videos_38_1200_1459854139607.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=950000,RESOLUTION=648x486,CODECS="avc1.4d001f,mp4a.40.2"
Videos/Streaming/hls720m_Videos_38_1200_1459854139607.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=522000,RESOLUTION=426x320,CODECS="avc1.4d001f,mp4a.40.2"
Videos/Streaming/hls480m_Videos_38_1200_1459854139607.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=371000,RESOLUTION=320x240,CODECS="avc1.4d001f,mp4a.40.2"
Videos/Streaming/hls360m_Videos_38_1200_1459854139607.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=279000,RESOLUTION=240x180,CODECS="avc1.4d001f,mp4a.40.2"
Videos/Streaming/hls240m_Videos_38_1200_1459854139607.m3u8

在jwplayer中它显示我的标签

enter image description here

有人可以告诉我为什么它没有显示我给出的hls标签吗?

1 个答案:

答案 0 :(得分:1)

你的水平是不正确的。

你必须使用BANDWIDTH这个

#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1173000,RESOLUTION=1024x768,CODECS="avc1.4d001f,mp4a.40.2" Videos/Streaming/hls1080m_Videos_38_1200_1459854139607.m3u8

BANDWIDTH = 1173 000 是"1173": "768p" or "1173": "720p"

我希望这可以帮到你