TheWidlarzGroup / react-native-video

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

[BUG]: iOS looping/repeat has noticable gap between playbacks. #3885

Open AlexLerman opened 3 months ago

AlexLerman commented 3 months ago

Version

6.2.0

What platforms are you having the problem on?

iOS

System Version

17.5.1

On what device are you experiencing the issue?

Real device

Architecture

Old architecture

What happened?

Looping using repeat has an audio gap between tracks. File type is .m4a. No problems on react-native-sound though similar issue on expo-av. File is 41s long so I don't believe it's a buffering issue. No such gap on Android.

Reproduction

repository link

Reproduction

Step to reproduce this bug are:

  1. Use file type with no gap like .m4a
  2. Load file from MainBundle with'file:/${fs.MainBundlePath}/${filename}' (Will look something like file://private/var/containers/Bundle/Application/CCB722FF-4134-463F-8969-C481A84CAE51/{yourapp}/{filename}.m4a
  3. Render Video component, set repeat property to true, wait for file to repeat.
  4. You'll hear a noticeable gap on iOS between the end of you playback and the beginning of the next.
freeboub commented 3 months ago

I think this old PR is a good clue to start investigate the issue ... https://github.com/TheWidlarzGroup/react-native-video/pull/1799/files

KrzysztofMoch commented 1 month ago

This is caused because of "seeking" - when video is ending we seek it to start and it seems to be slow - not sure if we can do anything about it

github-actions[bot] commented 5 days 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.