TheWidlarzGroup / react-native-video

A <Video /> component for react-native
http://thewidlarzgroup.github.io/react-native-video/
MIT License
7.15k stars 2.88k forks source link

[BUG]: onBuffer returns incorrect value on ios for hls/m3u8 video format #3941

Open maksymhcode-care opened 3 months ago

maksymhcode-care commented 3 months ago

Version

6.3.0

What platforms are you having the problem on?

iOS

System Version

IOS 17.5

On what device are you experiencing the issue?

Real device, Simulator

Architecture

Old architecture

What happened?

If you use the HLS/M3U8 video format, the app does not work as expected. After buffering is complete, the onBuffer event fires several times within one second and remains stuck on True until you seek the video and force rebuffering. image

Reproduction

No response

Reproduction

Step to reproduce this bug are: No specific version, you can use links from this website to reproduce it https://ottverse.com/free-hls-m3u8-test-urls/

abdul-skylinx commented 3 months ago

I'm also facing this issue as well.

maksymhcode-care commented 3 months ago

I'm also facing this issue as well.

It's a work around, but i can suggest you to try this:

const onPlaybackStateChanged = ({ isPlaying }) => { setIsLoading(!isPaused.current && !isPlaying); };

Basically isPlaying from onPlaybackStateChanged return false, but you did not paused the video it means it's loading

maksymhcode-care commented 2 months ago

@KrzysztofMoch @freeboub is it possible to at least ensure that isBufferting will not be triggered if the video is playing?

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity. If there won't be any activity in the next 14 days, this issue will be closed automatically.

github-actions[bot] commented 3 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.