1

我已经创建了 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 中,它向我显示标签,例如

在此处输入图像描述

谁能告诉我为什么它不显示我给定的 hls 标签?

4

1 回答 1

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

带宽 = 1173 000 是"1173": "768p" or "1173": "720p"

我希望这对你有帮助

于 2016-05-29T13:22:11.477 回答