-
Notifications
You must be signed in to change notification settings - Fork 14
fix: #72 On Android : The app stops playing when the device turns to sleep mode #79
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
base: main
Are you sure you want to change the base?
Conversation
docs: Setting permissions in AndroidManifest.xml
759f898 to
6c42691
Compare
dehy
left a comment
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.
Thank you for you contribution! I have some questions about the changes you made.
| implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
| implementation "androidx.media3:media3-exoplayer:1.3.1" | ||
| implementation "androidx.media3:media3-exoplayer:1.4.1" | ||
| implementation "androidx.media3:media3-ui:1.4.1" |
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.
this lib may not be necessary as the UI is not used
|
|
||
| private val context = reactContext | ||
| private var player: ExoPlayer = ExoPlayer.Builder(reactContext).build() | ||
| private var controller: MediaController? = null |
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.
Is a controller mandatory to manage the MediaSession?
This commit aim to use exoPlayer as a foreground service as recommanded here Create a basic media player app using Media3 ExoPlayer
This allow to automatically push notification when the screen turns off.