Пример #1
0
 @Override
 public void surfaceDestroyed(SurfaceHolder holder) {
   if (mNativeContentVideoView != 0) {
     nativeSetSurface(mNativeContentVideoView, null);
   }
   mSurfaceHolder = null;
   post(mExitFullscreenRunnable);
 }
Пример #2
0
 @CalledByNative
 protected void openVideo() {
   if (mSurfaceHolder != null) {
     mCurrentState = STATE_IDLE;
     if (mNativeContentVideoView != 0) {
       nativeRequestMediaMetadata(mNativeContentVideoView);
       nativeSetSurface(mNativeContentVideoView, mSurfaceHolder.getSurface());
     }
   }
 }
Пример #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());
     }
   }
 }