Skip to content

Stop playback and return home on CEC active source loss#830

Open
Kaluzny-IT wants to merge 3 commits intojellyfin:masterfrom
Kaluzny-IT:cec-stop-playback
Open

Stop playback and return home on CEC active source loss#830
Kaluzny-IT wants to merge 3 commits intojellyfin:masterfrom
Kaluzny-IT:cec-stop-playback

Conversation

@Kaluzny-IT
Copy link
Copy Markdown

Changes

  • CEC on roku players with low power mode play for ~15mins if the user powers off the TV with the roku remote. Monitor CEC active source status to detect when the TV is powered off or the input is switched away. When the device loses active source, video and audio playback are stopped and the app returns to the Home screen.

Issues

@Kaluzny-IT Kaluzny-IT marked this pull request as ready for review April 15, 2026 21:42
@Kaluzny-IT Kaluzny-IT requested a review from a team as a code owner April 15, 2026 21:42
@jimdogx
Copy link
Copy Markdown
Member

jimdogx commented Apr 30, 2026

Update the Whats New if you'd like credit for your work.

Copy link
Copy Markdown
Member

@1hitsong 1hitsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be a user setting defaulted to disabled.

My wife frequently plays audio over headphones when she sleeps. She plays something then turns the TV off. My understanding of the CEC event is when she turns the TV off, playback will stop. Which means users will have lost an ability by implementing this as-is.

end if

' Stop audio playback if active
if m.global.audioPlayer.state = "playing" or m.global.audioPlayer.state = "paused"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if m.global.audioPlayer.state = "playing" or m.global.audioPlayer.state = "paused"
if isStringEqual(m.global.audioPlayer.state, MediaPlaybackState.PLAYING) or isStringEqual(m.global.audioPlayer.state, MediaPlaybackState.PAUSED)

@michaelcresswell
Copy link
Copy Markdown
Contributor

This needs to be a user setting defaulted to disabled.

Do separate video and audio settings make sense? Stopping video when the TV turns off seems reasonable. Not stopping audio by default would address the use case you’re describing. The new code is already checking the playback type so I don’t think separate config for each would be much more work.

That being said, I don’t have any Rokus that would benefit from CEC so not a major concern for me either way.

@1hitsong
Copy link
Copy Markdown
Member

1hitsong commented May 2, 2026

Separate A/V settings feels like overkill for a 1st pass to me. Perhaps we go with 1 for the start and if peeps ask for it we could separate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants