Apple TV HDMI Connected device turn off detection problem via HDMI

Hello, we have HLS Stream app on Apple TV. Our streams are DRM protected. We have problem with streams when source device is turned off. For example, user start to watch our HLS DRM Protected content. After some time, user turns off device (it can be Monitor or TV via connected HDMI). Our app does not understand HDMI Source device turned off. Is there any way to understand HDMI connected device is turned off on Swift?

Apple TV HDMI Connected device turn off detection problem via HDMI
 
 
Q