You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
headless start from android auto without DRAW_OVER_OTHER_APPS
Describe the solution you'd like
I think i figured this all out now as I did the migration to media3. Not sure if this is applicable to RNTP 4.1.1/exoplayer2.
Effectively I was wrong that the android service started by Auto doesnt start the JS engine. It does. It's just the view renders do not, plus RNTP forbids background player setup by default. So the trick is to move all player setups and relevant listeners out of any hooks, and move them into index.js instead (for example, inside PlaybackService() of TrackPlayer.registerPlaybackService(() => PlaybackService);). the example app should start headlessly now
This may be fairlytedious if many of the listeners are set up as hooks.
The old DRAW_OVER_OTHER_APPS method is still a dumb plug and play way to enable sorta headless playback.
Describe alternatives you've considered
N/A
Additional context
N/A
Please feel free to join our Discord and chat with us in the #dev channel if you'd like to work on this.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
headless start from android auto without DRAW_OVER_OTHER_APPS
Describe the solution you'd like
I think i figured this all out now as I did the migration to media3. Not sure if this is applicable to RNTP 4.1.1/exoplayer2.
Effectively I was wrong that the android service started by Auto doesnt start the JS engine. It does. It's just the view renders do not, plus RNTP forbids background player setup by default. So the trick is to move all player setups and relevant listeners out of any hooks, and move them into index.js instead (for example, inside
PlaybackService()
ofTrackPlayer.registerPlaybackService(() => PlaybackService);
). the example app should start headlessly nowThis may be fairly tedious if many of the listeners are set up as hooks.
The old DRAW_OVER_OTHER_APPS method is still a dumb plug and play way to enable sorta headless playback.
Describe alternatives you've considered
N/A
Additional context
N/A
Please feel free to join our Discord and chat with us in the #dev channel if you'd like to work on this.
The text was updated successfully, but these errors were encountered: