Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Tyler_Smith
Streaming Star

Stop player when app closes (user presses home)

In Scene graph, if I have a video playing and then press the home button it leaves the stream persisting in the background and prevents the player from being used by another app (itself, netflix, youtube, etc) unless I manually restart the device. If the video is "stopped" before the app exit everything works fine.

Is there a way to detect an app close/exit event from within a screengraph component that I can listen for?
Tyler Smith
0 Kudos
1 REPLY 1
Tyler_Smith
Streaming Star

Re: Stop player when app closes (user presses home)

Looks like this is a defect of extending a custom component.
My video screen extended a "CoreScreen" component I created. This caused the player to not be destroyed when the app closed.
I changed it to extend "Group" and it is no longer an issue.

Fun times!
Tyler Smith
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.