androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android

Home Page:https://developer.android.com/media/media3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I pause the player when we change the HDMI source

simranthakkar1996 opened this issue · comments

As a Fire TV user, I want a video to pause when changing the HDMI source so that I don’t lose my watching progress or eat through my internet bandwidth.

The video didn't pause when changing the HDMI source.

Steps to Reproduce:
We will need a fire tv stick device to test and reproduce this behaviour.
Download, Install, and launch the app.
Play any content.
Change the HDMI source to another input.
After a few minutes return back to device connected to HDMI source.

Actual Behavior: Playback continues to play in the background when HDMI source is changed
Expected Behavior: Video should be in paused state when changing HDMI source

According to the Amazon Fire TV requirements for multimedia apps, https://developer.amazon.com/docs/fire-tv/multimedia-app-requirements.html#requirement-71-hdmi-disconnection, they suggest that applications should pause when HDMI is disconnection. They supply a note reading:

Note: HDMI events are also sent when the input of the display is changed from the Fire TV to something else. Most applications are expected to stay in a paused state when the HDMI cable is reconnected to a display.

The Android APIs and documentation discussed in Amazon Fire TV handling hdmi events should be helpful.

I'm going to close this issue as I supplied Fire TV provided documentation for your scenario. Please re-open or create a new issue if you have ExoPlayer specific questions!