Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug][android] duplicated source requests sent in looped videos? #3428

Closed
lovegaoshi opened this issue Dec 19, 2023 · 2 comments · Fixed by #3514
Closed

[bug][android] duplicated source requests sent in looped videos? #3428

lovegaoshi opened this issue Dec 19, 2023 · 2 comments · Fixed by #3514

Comments

@lovegaoshi
Copy link
Contributor

Bug

Platform

Which player are you experiencing the problem on:

  • Android

Environment info

Library version: 6.0.0 beta2
Device: android 14 samsung S21, emulator

Steps To Reproduce

I don't see this behavior in 5.2.1, started to see this in v6; expo-av when ejected to bare workflow also has the same behavior if it's any relevant, but not when managed (??)

  1. set a video to loop
  2. monitor httpToolkit
  3. the source (*.bilivideo.com) is periodically requested
    Screenshot from 2023-12-18 12-43-32

...

Expected behaviour

the source is only requested once

Reproducible sample code

https://github.com/lovegaoshi/videotest/tree/rnv6

Video sample

If possible, include a link to the video that has the problem that can be streamed or downloaded from.

@lovegaoshi
Copy link
Contributor Author

after some initial investigations:

this issue was describing the exact same behavior, however it was due to using exoplayer.setMediaItem instead of setMediaSource, when migrating away from the depreciated exoplayer.prepare(mediaSource). while rnv5.2.1 does use exoplayer.prepare, rnv6 also does use setMediaSource. using exoplayer.prepare in rnv6 doesnt magically fix the issue either.

then I'm considering this to be a problem with the media3 migration but the google media3 demo repo uses exoplayer.setMediaItems and I suspect this might be circling back to the problem described in the above issue; both media3 and exoplayer2 keep requesting the source as below:
Screenshot from 2024-01-03 09-52-21
I also tried to shove a simpleCache in RNV following this but while it did create the cache folder, nothing is actually stored within.

next i'll try to use setMediaSource in media3 and if this still occurs, I'll raise the issue to google; otherwise something was wrong in the RNV repo.

have no idea why expo has that weird behavior.

@lovegaoshi
Copy link
Contributor Author

I got some clarifications from the media3 team and was able to make a caching system work; so not directly fixing this issue (bug?) but caching will effectively stop the repeated requests as well. I saw in the docs RNV only supports caching for iOS and from a quick repo search I dont see SimpleCache; is it still correct RNV doesnt have cache for android? I can implement that and migrate my app to RNV6 then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants