Exoplayer: exoplayer模式 播放hls 进度条不对

Created on 13 Nov 2020  ·  5Comments  ·  Source: google/ExoPlayer

播放hls 直播流 exo内核 getDuration() 不为0
ijk内核getDuration()为0
导致直播播放的时候进度条有进度
这个可以修复吗
附上链接地址
http://cctvalih5ca.v.myalicdn.com/live/cctv1_2/index.m3u8

duplicate question

Most helpful comment

I means that I play this link with ijkplayer then the value get by getDuration() is 0, but exoplayer is not 0

The duration indicated in ExoPlayer is the sum of the segments duration given in the EXTINF tags.

the m3u8 stream can be live or on-demand,how can i know that

You can use Player#isCurrentWindowLive (see #2668 for more info).

All 5 comments

Google Translate translation:

Play hls live stream exo kernel getDuration() is not 0
ijk kernel getDuration() is 0
Cause the progress bar to have progress when the live broadcast is playing
Can this be fixed
Attach the link address

No sure I understand the question. You don't want any progress displayed in the progress bar, is that right?

In this case, I would remove or hide the progress bar. You can also implement a custom TimeBar.

You should check these pages:

@kim-vde
thank you for you answer
I means that I play this link with ijkplayer then the value get by getDuration() is 0, but exoplayer is not 0
the m3u8 stream can be live or on-demand,how can i know that

I means that I play this link with ijkplayer then the value get by getDuration() is 0, but exoplayer is not 0

The duration indicated in ExoPlayer is the sum of the segments duration given in the EXTINF tags.

the m3u8 stream can be live or on-demand,how can i know that

You can use Player#isCurrentWindowLive (see #2668 for more info).

thx , it resolve it by Player#isCurrentWindowLive

Was this page helpful?
0 / 5 - 0 ratings