Question

How can i detect showing on Apple TV?

I've tried already to detect num of screens:

[[UIScreen screens] count]

But it remains on 1.

I've tried also to listen to an event:

    [[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(screenDidConnect:)
                                             name:UIScreenDidConnectNotification
                                           object:nil];

But the event never fire.

Any tips/tricks?

Thanks in advance!

Was it helpful?

Solution

Found the answer!

As simple as it could be:

Just do:

self.moviePlayer.isAirPlayVideoActive

It will return me whether the AirPlay is active/not active.

Thanks @rist

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top