1

I trying broadcast HLS stream to the IOS devices. HLS work like LIVE session. I have few video file and share each separate video with #EXT-X-ENDLIST. I send one after another. First video play normally, but next video doesn't begin from the beginning, IOS devices make jumping through this hls playlist.

For example:

enter code here
#EXTM3U
#EXT-X-TARGETDURATION:1
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:1,
mystream-1.ts
#EXTINF:1,
mystream-2.ts
#EXTINF:1,
mystream-3.ts
#EXTINF:1,
mystream-4.ts
#EXTINF:1,
mystream-5.ts
#EXTINF:1,
mystream-6.ts
#EXTINF:1,
mystream-7.ts

if IOS recv such playlist, then it doesn't begin playback from mystream-1.ts it begin from mystream-4.ts.

How could I fix it?

4

1 回答 1

1

正常情况下,当播放列表用于直播时(没有#EXT-X-ENDLIST),客户端将从播放列表末尾开始播放几个片段。这是因为它期望播放列表将不断更新更多的片段,并且客户端将循环检索播放列表。

您只需#EXT-X-ENDLIST在播放列表末尾添加标签即可修复它。

或者您可能希望流继续增长,在这种情况下,您可以尝试使用带有此标签的事件播放列表:#EXT-X-PLAYLIST-TYPE:EVENT

客户端的预期行为没有指定,所以我不确定应用程序是否会从头开始播放,但至少它应该能够从头开始。

于 2013-07-02T11:29:40.410 回答