Log in or register to post comments

Why disable QCARBehavior in Video Playback Example?

December 11, 2013 - 11:01am #1

Hi,

In the Video Playback example, in the file VideoPlaybackBehaviour.cs, in the function HandleStateChange there are these lines:

        if (newState == VideoPlayerHelper.MediaState.PLAYING_FULLSCREEN)
        {
            // Switching to full screen, disable QCARBehaviour (only applicable for iOS)
            QCARBehaviour qcarBehaviour = (QCARBehaviour) FindObjectOfType(typeof(QCARBehaviour));
            qcarBehaviour.enabled = false;
        }
        else if (mCurrentState == VideoPlayerHelper.MediaState.PLAYING_FULLSCREEN)
        {
            // Switching away from full screen, enable QCARBehaviour (only applicable for iOS)
            QCARBehaviour qcarBehaviour = (QCARBehaviour) FindObjectOfType(typeof(QCARBehaviour));
            qcarBehaviour.enabled = true;
        }
 
Why turn it off?
 
I had an issue where on returning from fullscreen on iOS the app would get stuck.
I commented-out this part (no enabling/disabling) and everything works great.
So why is this needed?
 
Thanks a lot,
  Yuval
 
 
Log in or register to post comments