Detecting when the TV is turned off?

Are there any events fired when the TV attached to the ATV is turned off?

No. I'd be interested in the use case, though.

I have a custom video player app and some users have reported issues where the ATV continues streaming after the TV has been turned off. It seems like AVPlayer is detecting this case somehow to pause video and network activity.

I've opened rdar://24245764

Thanks for filing the bug

Hi


Any news regarding this?


Best regards

Hi there,


In tvOS 11, we made some improvements on this front. However, there are some limitations that inhibit our ability to guarantee to always deliver this messaging, primarily due to the differences in how various TV sets behave in terms of HDMI and CEC signalling.


When the screen-saver comes up, when the system goes to sleep, when the HDMI cable is pulled – those things we can know about with certainty. But whether or not the attached TV indicates to us the current state varies. If we can tell that the TV has been powered down, we will deliver the appropriate notifications... but if those signals aren't indicataed, there's not much we can do.


Thanks!

Thanks,


What are these notifications? I've tried searching for some documentation with no luck.


Best regards

Nam

Hi Nam,


You should see the typical UIApplication willResignActiveNotification when the app is placed into the background as a result of the sleep event.


Thanks,

Josh

Hi Josh


Thank you for your reply.


applicationWillResignActive is called when I turn the tv on again after I turned it off. So it is a step too late. Is there any other events?


Best regards

Hi, Is there a way to detect TV power off when Apple TV is connected to TV?

Thanks

Detecting when the TV is turned off?
 
 
Q