@Override
 public void surfaceDestroyed(SurfaceHolder holder) {
   if (mNativeContentVideoView != 0) {
     nativeSetSurface(mNativeContentVideoView, null);
   }
   mSurfaceHolder = null;
   post(mExitFullscreenRunnable);
 }
 @CalledByNative
 protected void openVideo() {
   if (mSurfaceHolder != null) {
     mCurrentState = STATE_IDLE;
     if (mNativeContentVideoView != 0) {
       nativeRequestMediaMetadata(mNativeContentVideoView);
       nativeSetSurface(mNativeContentVideoView, mSurfaceHolder.getSurface());
     }
   }
 }
Example #3
0
 @CalledByNative
 private void openVideo() {
   if (mSurfaceHolder != null) {
     mCurrentState = STATE_IDLE;
     mCurrentBufferPercentage = 0;
     ContentVideoViewControls controls = mClient.createControls();
     if (controls == null) {
       controls = new FullScreenControls(getContext(), this);
     }
     setControls(controls);
     if (mNativeContentVideoView != 0) {
       nativeUpdateMediaMetadata(mNativeContentVideoView);
       nativeSetSurface(mNativeContentVideoView, mSurfaceHolder.getSurface());
     }
   }
 }