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(android, exoplayer): ensure playback progress is reported #2664

Conversation

freeboub
Copy link
Collaborator

@freeboub freeboub commented Apr 27, 2022

fix(android, exoplayer): ensure playback progress is reported even if player is paused

Adresses #2141 on Android.
and shall fix: #2372

Provide an example of how to test the change

A live channel sample is available in basic sample.
On live stream, position indicator keeps updating after playback is paused.

Focus area

You can ensure that position is not reported too often

Describe the changes

  • Don't test player state before sending time updates
  • safety check to avoid sending the same value multiple times (avoid UI updates)

@hueniverse
Copy link
Contributor

Thanks! As soon as we get it reviewed it will be merged!

private final Handler progressHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case SHOW_PROGRESS:
if (player != null
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you remove this null check? Wouldn't it be safer to leave it there? (I'm OK with removing the state checks, but null check might be beneficial here).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I fully agree ! change done

olivier bouillet added 2 commits June 15, 2022 21:57
…native-video into fix/report_time_position_when_updated

# Conflicts:
#	CHANGELOG.md
#	android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
@armands-malejevs armands-malejevs added 1 and removed 2 labels Jun 17, 2022
olivier bouillet added 3 commits June 23, 2022 21:55
…native-video into fix/report_time_position_when_updated

# Conflicts:
#	CHANGELOG.md
…eelSmart/react-native-video into fix/report_time_position_when_updated
@freeboub
Copy link
Collaborator Author

Just fix conflict, ready to merge

@hueniverse hueniverse merged commit 5120cd9 into TheWidlarzGroup:master Jun 23, 2022
@hueniverse hueniverse added this to the 6.0.0-alpha.2 milestone Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants