Exit full screen support on java side
bug:4312214 Change-Id: Id3c755db0a824d42f1f8d1a0952f63d2078d163a
This commit is contained in:
@@ -208,7 +208,7 @@ public class HTML5VideoFullScreen extends HTML5VideoView
|
||||
// view. This happens in the WebChromeClient before this method
|
||||
// is invoked.
|
||||
pauseAndDispatch(mProxy);
|
||||
|
||||
mProxy.dispatchOnStopFullScreen();
|
||||
mLayout.removeView(getSurfaceView());
|
||||
|
||||
if (mProgressView != null) {
|
||||
@@ -253,7 +253,8 @@ public class HTML5VideoFullScreen extends HTML5VideoView
|
||||
client.onShowCustomView(mLayout, mCallback);
|
||||
// Plugins like Flash will draw over the video so hide
|
||||
// them while we're playing.
|
||||
mProxy.getWebView().getViewManager().hideAll();
|
||||
if (webView.getViewManager() != null)
|
||||
webView.getViewManager().hideAll();
|
||||
|
||||
mProgressView = client.getVideoLoadingProgressView();
|
||||
if (mProgressView != null) {
|
||||
|
||||
@@ -65,6 +65,7 @@ class HTML5VideoViewProxy extends Handler
|
||||
private static final int ENDED = 201;
|
||||
private static final int POSTER_FETCHED = 202;
|
||||
private static final int PAUSED = 203;
|
||||
private static final int STOPFULLSCREEN = 204;
|
||||
|
||||
// Timer thread -> UI thread
|
||||
private static final int TIMEUPDATE = 300;
|
||||
@@ -287,8 +288,13 @@ class HTML5VideoViewProxy extends Handler
|
||||
}
|
||||
|
||||
public void dispatchOnPaused() {
|
||||
Message msg = Message.obtain(mWebCoreHandler, PAUSED);
|
||||
mWebCoreHandler.sendMessage(msg);
|
||||
Message msg = Message.obtain(mWebCoreHandler, PAUSED);
|
||||
mWebCoreHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
public void dispatchOnStopFullScreen() {
|
||||
Message msg = Message.obtain(mWebCoreHandler, STOPFULLSCREEN);
|
||||
mWebCoreHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
public void onTimeupdate() {
|
||||
@@ -560,6 +566,9 @@ class HTML5VideoViewProxy extends Handler
|
||||
case TIMEUPDATE:
|
||||
nativeOnTimeupdate(msg.arg1, mNativePointer);
|
||||
break;
|
||||
case STOPFULLSCREEN:
|
||||
nativeOnStopFullscreen(mNativePointer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -686,6 +695,7 @@ class HTML5VideoViewProxy extends Handler
|
||||
private native void nativeOnPaused(int nativePointer);
|
||||
private native void nativeOnPosterFetched(Bitmap poster, int nativePointer);
|
||||
private native void nativeOnTimeupdate(int position, int nativePointer);
|
||||
private native void nativeOnStopFullscreen(int nativePointer);
|
||||
private native static boolean nativeSendSurfaceTexture(SurfaceTexture texture,
|
||||
int baseLayer, int videoLayerId, int textureName,
|
||||
int playerState);
|
||||
|
||||
Reference in New Issue
Block a user