-
Notifications
You must be signed in to change notification settings - Fork 201
Do not auto-play videos. #3978
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
Do not auto-play videos. #3978
Conversation
@@ -238,7 +235,8 @@ private fun ExoPlayerMediaVideoView( | |||
|
|||
OnLifecycleEvent { _, event -> | |||
when (event) { | |||
Lifecycle.Event.ON_RESUME -> exoPlayer.play() | |||
Lifecycle.Event.ON_CREATE -> exoPlayer.addListener(playerListener) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How it wasn't necessary before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the addListener
, I feel better with having the parity onCreate
/onDestroy
.
For the prepare
, if I do not call it onResume
, we get on black screen when putting the app in bg then in fg, not sure why.
All is working fine when testing the player with this code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AddListener and dispose is not exactly parity I'd say?
But are we not already adding this listener somewhere else? that was my question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The listener was set in a LaunchedEffect block (previous version line 132, see the diff)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I didn't see it!
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3978 +/- ##
===========================================
+ Coverage 83.03% 83.08% +0.04%
===========================================
Files 1796 1805 +9
Lines 45600 45638 +38
Branches 5375 5380 +5
===========================================
+ Hits 37864 37918 +54
+ Misses 5855 5833 -22
- Partials 1881 1887 +6 ☔ View full report in Codecov by Sentry. |
Following what has been done on iOS and avoiding user to get loud audio when clicking on a video in the timeline, the application will not auto play video when open in full screen.