use of org.chromium.content.browser.ActivityContentVideoViewEmbedder in project AndroidChromium by JackyAndroid.
the class TabWebContentsDelegateAndroid method getContentVideoViewEmbedder.
@Override
public ContentVideoViewEmbedder getContentVideoViewEmbedder() {
return new ActivityContentVideoViewEmbedder(mTab.getActivity()) {
@Override
public void enterFullscreenVideo(View view, boolean isVideoLoaded) {
super.enterFullscreenVideo(view, isVideoLoaded);
FullscreenManager fullscreenManager = mTab.getFullscreenManager();
if (fullscreenManager != null) {
fullscreenManager.setOverlayVideoMode(true);
// Disable double tap for video.
ContentViewCore cvc = mTab.getContentViewCore();
if (cvc != null) {
cvc.updateDoubleTapSupport(false);
}
}
}
@Override
public void exitFullscreenVideo() {
FullscreenManager fullscreenManager = mTab.getFullscreenManager();
if (fullscreenManager != null) {
fullscreenManager.setOverlayVideoMode(false);
// Disable double tap for video.
ContentViewCore cvc = mTab.getContentViewCore();
if (cvc != null) {
cvc.updateDoubleTapSupport(true);
}
}
super.exitFullscreenVideo();
}
};
}
Aggregations