Merge "Hide plugin views when we start playing HTML5 video" into gingerbread
This commit is contained in:
@@ -138,6 +138,10 @@ class HTML5VideoViewProxy extends Handler
|
|||||||
mCurrentProxy.dispatchOnEnded();
|
mCurrentProxy.dispatchOnEnded();
|
||||||
else
|
else
|
||||||
mCurrentProxy.dispatchOnPaused();
|
mCurrentProxy.dispatchOnPaused();
|
||||||
|
|
||||||
|
// Re enable plugin views.
|
||||||
|
mCurrentProxy.getWebView().getViewManager().showAll();
|
||||||
|
|
||||||
isVideoSelfEnded = false;
|
isVideoSelfEnded = false;
|
||||||
mCurrentProxy = null;
|
mCurrentProxy = null;
|
||||||
mLayout.removeView(mVideoView);
|
mLayout.removeView(mVideoView);
|
||||||
@@ -199,6 +203,9 @@ class HTML5VideoViewProxy extends Handler
|
|||||||
mTimer = new Timer();
|
mTimer = new Timer();
|
||||||
mVideoView.start();
|
mVideoView.start();
|
||||||
client.onShowCustomView(mLayout, mCallback);
|
client.onShowCustomView(mLayout, mCallback);
|
||||||
|
// Plugins like Flash will draw over the video so hide
|
||||||
|
// them while we're playing.
|
||||||
|
mCurrentProxy.getWebView().getViewManager().hideAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isPlaying(HTML5VideoViewProxy proxy) {
|
public static boolean isPlaying(HTML5VideoViewProxy proxy) {
|
||||||
@@ -599,6 +606,10 @@ class HTML5VideoViewProxy extends Handler
|
|||||||
return new HTML5VideoViewProxy(webViewCore.getWebView(), nativePtr);
|
return new HTML5VideoViewProxy(webViewCore.getWebView(), nativePtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* package */ WebView getWebView() {
|
||||||
|
return mWebView;
|
||||||
|
}
|
||||||
|
|
||||||
private native void nativeOnPrepared(int duration, int width, int height, int nativePointer);
|
private native void nativeOnPrepared(int duration, int width, int height, int nativePointer);
|
||||||
private native void nativeOnEnded(int nativePointer);
|
private native void nativeOnEnded(int nativePointer);
|
||||||
private native void nativeOnPaused(int nativePointer);
|
private native void nativeOnPaused(int nativePointer);
|
||||||
|
|||||||
@@ -7845,6 +7845,10 @@ public class WebView extends AbsoluteLayout
|
|||||||
nativeUpdateCachedTextfield(updatedText, mTextGeneration);
|
nativeUpdateCachedTextfield(updatedText, mTextGeneration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* package */ ViewManager getViewManager() {
|
||||||
|
return mViewManager;
|
||||||
|
}
|
||||||
|
|
||||||
private native int nativeCacheHitFramePointer();
|
private native int nativeCacheHitFramePointer();
|
||||||
private native Rect nativeCacheHitNodeBounds();
|
private native Rect nativeCacheHitNodeBounds();
|
||||||
private native int nativeCacheHitNodePointer();
|
private native int nativeCacheHitNodePointer();
|
||||||
|
|||||||
Reference in New Issue
Block a user