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) Seeking backward after video ends resumes playback even though player was paused #4146

Closed
paulrinaldi opened this issue Sep 4, 2024 · 7 comments · Fixed by #4147
Labels
Accepted Issue is confirmed and accepted by maintainers team bug Platform: Android Repro Provided

Comments

@paulrinaldi
Copy link
Contributor

paulrinaldi commented Sep 4, 2024

Version

6.5.0

What platforms are you having the problem on?

Android

System Version

14

On what device are you experiencing the issue?

Real device, Simulator

Architecture

Old architecture

What happened?

See title.

Reproduction Link

repository link

Reproduction

Steps to reproduce this bug are:

After a video (using asset file mp4) ends in the basic example if you comment out the onEnd code, you'll notice these logs:

LOG  onPlaybackStateChanged {"isPlaying": false, "isSeeking": false}
LOG  onPlaybackRateChange {"playbackRate": 0}

Then when you drag the progress bar back (because it's hard to see, I enable the notification controls and pull it back to about halfway in the video), the video unpauses and you'll notice these logs:

LOG  onPlaybackRateChange {"playbackRate": 0}
LOG  onVideoBuffer
LOG  onPlaybackStateChanged {"isPlaying": true, "isSeeking": true}
LOG  onPlaybackRateChange {"playbackRate": 1}
LOG  onReadyForDisplay
LOG  onVideoBuffer

You will observe this visually:
https://github.com/user-attachments/assets/f7758612-bd80-43c0-838f-97e4fec50f50

@paulrinaldi paulrinaldi added the bug label Sep 4, 2024
Copy link

github-actions bot commented Sep 4, 2024

Thank you for your issue report. Please note that the following information is missing or incomplete:

  • reproduction link

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

There is a newer version of the library available. You are using version 6.4.5, while the latest stable version is 6.5.0. Please update to the latest version and check if the issue still exists.

Note: If the issue still exists, please update the issue report with the latest information.

Copy link

github-actions bot commented Sep 4, 2024

Thank you for your issue report. Please note that the following information is missing or incomplete:

  • reproduction link

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

Copy link

github-actions bot commented Sep 4, 2024

Thank you for your bug report. We will review it and get back to you if we need more information.

@paulrinaldi
Copy link
Contributor Author

I traced as much as I could in the android code, recorded log files, and scanned through them but I could not find why after seeking, the player resumes.

For now, after seek, if the state of my player is paused, I run playerRef.current.pause() right after playerRef.current.seek() and it does what I need it to do.

@freeboub
Copy link
Collaborator

freeboub commented Sep 4, 2024

I was able to reproduce it in the sample (it uses the prop instead of playerRef.current.pause() but it should be the same).
here is a fix proposal: #4147

I am not sure of the expected events when you pause after onEnd.
Currently, only a playbackRateChange event is generated

@freeboub freeboub added Accepted Issue is confirmed and accepted by maintainers team and removed Missing info Some information from template are missing Waiting for Review labels Sep 4, 2024
@paulrinaldi
Copy link
Contributor Author

I ran yarn run ios to compare but just got an error and white screen. Will try to get it running and compare. I think reflecting what iOS does would be acceptable or what RNV used to do (i.e. what dev's expect).

@freeboub
Copy link
Collaborator

freeboub commented Sep 5, 2024

I tested with the sample on ios, I don't reproduce the issue you describe... I have the same behavior than on android.
And yes I agree we should have the same behavior on android and ios!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue is confirmed and accepted by maintainers team bug Platform: Android Repro Provided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants