Ejemplo n.º 1
0
    void OnApplicationPause(bool pause)
    {
        mAppPaused = pause;

        if (!mIsInited)
        {
            return;
        }

        if (pause)
        {
            // Handle pause event natively
            mVideoPlayer.OnPause();

            // Store the playback position for later
            mSeekPosition = mVideoPlayer.GetCurrentPosition();

            // Deinit the video
            mVideoPlayer.Deinit();

            // Reset initialization parameters
            mIsInited   = false;
            mIsPrepared = false;

            // Set the current state to Not Ready
            SetNotReady();
        }
    }
Ejemplo n.º 2
0
    void OnApplicationPause(bool pause)
    {
        mAppPaused = pause;

        if (!mIsInited)
        {
            return;
        }

        if (pause)
        {
            // Handle pause event natively
            mVideoPlayer.OnPause();

            // Store the playback position for later
            mSeekPosition = mVideoPlayer.GetCurrentPosition();

            // Deinit the video
            mVideoPlayer.Deinit();

            // Reset initialization parameters
            mIsInited      = false;
            mInitInProgess = false;

            // Set the current state to Not Ready
            HandleStateChange(VideoPlayerHelper.MediaState.NOT_READY);
            mCurrentState = VideoPlayerHelper.MediaState.NOT_READY;
        }
    }
Ejemplo n.º 3
0
 void OnDestroy()
 {
     // Deinit the video
     mVideoPlayer.Deinit();
 }