Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
Tyler_Smith
Level 7

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
Senior Developer, REDspace
redspace.com
0 Kudos
1 Reply
Tyler_Smith
Level 7

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
Senior Developer, REDspace
redspace.com
0 Kudos