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

[expo-av] Fix progress events when no playback is active #9545

Merged
merged 4 commits into from Aug 5, 2020

Conversation

IjzerenHein
Copy link
Contributor

Why

Fixes #8711. When a video (also applies to audio) is loaded, immediately after that period progress events are emitted, even if the video isn't playing. PR #7193 introduced some changes which caused the progress-eventing to be started, but never stopped.

How

  • Updated status progress update code to correctly start/stop progress eventing
  • Progress events looper is now only started when a status listener is registered
  • Fixed looper interval rate not updated when changing the rate using progressUpdateIntervalMillis
  • Notify app immediately on the current status when setting a status update listener

Test Plan

  • Added progress-event logging to NCL
  • Added unit-test to verify progress events are [yes/no] fired and with the correct interval speed
  • Verified that all unit-tests succeed on both iOS and Android
  • Verified that progress-events keep firing when looping enabled and advance to new track

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2020

Native Component List for this branch is ready

Copy link
Contributor

@bbarthec bbarthec left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@IjzerenHein IjzerenHein merged commit 9ed42d1 into master Aug 5, 2020
@IjzerenHein IjzerenHein deleted the @hein/expo-av/android-progress-events branch August 5, 2020 09:12
Jamedjo pushed a commit to Jamedjo/expo that referenced this pull request Feb 4, 2021
* [ncl] Add video playback status logging

* [expo-av] Fix status events emitted when not playing on Android

* [test] Add test for Video progress status update events

* [expo-av] Update changelog
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.

expo-av OnPlaybackStatusUpdate Android Weirdness
2 participants