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

fix(avoid): avoid early return in setSrc #3759

Merged
merged 5 commits into from
May 13, 2024

Conversation

freeboub
Copy link
Collaborator

Summary

Fix issue found in sample
Use case:

  • launch sample on android
  • channel up until invalid url
  • channel down
  • Issue: video doesn't restart

Changes

Continue handling setSrc even is player is not allocated

Motivation

@KrzysztofMoch This is more a PR to discuss (even if it really fix the issue).
Don't you think this part of code should be called after reloadSource like in initializePlayerCode :

private void initializePlayerCore(ReactExoplayerView self) {

Copy link
Collaborator

@KrzysztofMoch KrzysztofMoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg, this surly should be like this ... good catch!

@KrzysztofMoch
Copy link
Collaborator

KrzysztofMoch commented May 11, 2024

Don't you think this part of code should be called after reloadSource like in initializePlayerCode :

I guess you are right, maybe we can move code that is setting metadata to function to don't duplicate code

@KrzysztofMoch
Copy link
Collaborator

I will merge this as it fix problem, will look into moving this to function and call it after reloadSource

@KrzysztofMoch KrzysztofMoch merged commit 2e623ca into TheWidlarzGroup:master May 13, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants