-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat: add setSource API function fix ads playback #4185
feat: add setSource API function fix ads playback #4185
Conversation
…o into feat/reworkSourceStart # Conflicts: # src/Video.tsx
@KrzysztofMoch If you want to do a first review on this PR it would be great, There is a remaining resize glitch on sample when we change video on android, I will fix that. |
OK, this is fixed ! |
@freeboub |
android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
Outdated
Show resolved
Hide resolved
PR Looks Good For Me - only this ADS thing need to be fixed and we can merge |
…o into feat/reworkSourceStart
@KrzysztofMoch Done, thank you for the feedback ! |
Summary
feat: Add setSource API
fix(android): playback start up
Motivation
Add setSource API, linked to: #3352
fix: #3928
Changes
Add setSource command: easy on ios
On Android:
I moved management of playback stop from : ReactExoplayerViewManager.kt to ReactExoplayerView.java
I added concept of running source. I allows to avoid race conditions. during asynchronious process of startup, we are now stopping it if start has been canceled
For ads, I avoid releasing this adsLoader when the player is not destroyed.
Test plan
Sample has been patched to integrate this source change