org.chromium.content.browser.ContentVideoView Java Examples
The following examples show how to use
org.chromium.content.browser.ContentVideoView.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ChromeFullscreenManager.java From delion with Apache License 2.0 | 5 votes |
@Override public void onWindowFocusChanged(Activity activity, boolean hasFocus) { if (mActivity != activity) return; onWindowFocusChanged(hasFocus); ContentVideoView videoView = ContentVideoView.getContentVideoView(); if (videoView != null) { videoView.onFullscreenWindowFocused(); } }
Example #2
Source File: ChromeActivity.java From delion with Apache License 2.0 | 5 votes |
/** * Exits the fullscreen mode, if any. Does nothing if no fullscreen is present. * @return Whether the fullscreen mode is currently showing. */ protected boolean exitFullscreenIfShowing() { ContentVideoView view = ContentVideoView.getContentVideoView(); if (view != null && view.getContext() == this) { view.exitFullscreen(false); return true; } if (getFullscreenManager() != null && getFullscreenManager().getPersistentFullscreenMode()) { getFullscreenManager().setPersistentFullscreenMode(false); return true; } return false; }
Example #3
Source File: ChromeFullscreenManager.java From AndroidChromium with Apache License 2.0 | 5 votes |
@Override public void onWindowFocusChanged(Activity activity, boolean hasFocus) { if (mActivity != activity) return; onWindowFocusChanged(hasFocus); // {@link ContentVideoView#getContentVideoView} requires native to have been initialized. if (!LibraryLoader.isInitialized()) return; ContentVideoView videoView = ContentVideoView.getContentVideoView(); if (videoView != null) { videoView.onFullscreenWindowFocused(); } }
Example #4
Source File: ChromeActivity.java From AndroidChromium with Apache License 2.0 | 5 votes |
/** * Exits the fullscreen mode, if any. Does nothing if no fullscreen is present. * @return Whether the fullscreen mode is currently showing. */ protected boolean exitFullscreenIfShowing() { ContentVideoView view = ContentVideoView.getContentVideoView(); if (view != null && view.getContext() == this) { view.exitFullscreen(false); return true; } if (getFullscreenManager() != null && getFullscreenManager().getPersistentFullscreenMode()) { getFullscreenManager().setPersistentFullscreenMode(false); return true; } return false; }
Example #5
Source File: ChromeFullscreenManager.java From 365browser with Apache License 2.0 | 5 votes |
@Override public void onWindowFocusChanged(Activity activity, boolean hasFocus) { if (mActivity != activity) return; onWindowFocusChanged(hasFocus); // {@link ContentVideoView#getContentVideoView} requires native to have been initialized. if (!LibraryLoader.isInitialized()) return; ContentVideoView videoView = ContentVideoView.getContentVideoView(); if (videoView != null) { videoView.onFullscreenWindowFocused(); } }
Example #6
Source File: ChromeActivity.java From 365browser with Apache License 2.0 | 5 votes |
/** * Exits the fullscreen mode, if any. Does nothing if no fullscreen is present. * @return Whether the fullscreen mode is currently showing. */ protected boolean exitFullscreenIfShowing() { ContentVideoView view = ContentVideoView.getContentVideoView(); if (view != null && view.getContext() == this) { view.exitFullscreen(false); return true; } if (getFullscreenManager() != null && getFullscreenManager().getPersistentFullscreenMode()) { getFullscreenManager().setPersistentFullscreenMode(false); return true; } return false; }
Example #7
Source File: AwContentsClient.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
@Override public void onShowCustomView(View view) { WebChromeClient.CustomViewCallback cb = new WebChromeClient.CustomViewCallback() { @Override public void onCustomViewHidden() { ContentVideoView contentVideoView = ContentVideoView.getContentVideoView(); if (contentVideoView != null) contentVideoView.exitFullscreen(false); } }; AwContentsClient.this.onShowCustomView(view, cb); }
Example #8
Source File: AwContentsClient.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
@Override public void onShowCustomView(View view) { WebChromeClient.CustomViewCallback cb = new WebChromeClient.CustomViewCallback() { @Override public void onCustomViewHidden() { ContentVideoView contentVideoView = ContentVideoView.getContentVideoView(); if (contentVideoView != null) contentVideoView.exitFullscreen(false); } }; AwContentsClient.this.onShowCustomView(view, cb); }
Example #9
Source File: ChromeTabbedActivity.java From delion with Apache License 2.0 | 4 votes |
private boolean isFullscreenVideoPlaying() { View view = ContentVideoView.getContentVideoView(); return view != null && view.getContext() == this; }
Example #10
Source File: ChromeTabbedActivity.java From AndroidChromium with Apache License 2.0 | 4 votes |
private boolean isFullscreenVideoPlaying() { View view = ContentVideoView.getContentVideoView(); return view != null && view.getContext() == this; }
Example #11
Source File: ChromeTabbedActivity.java From 365browser with Apache License 2.0 | 4 votes |
private boolean isFullscreenVideoPlaying() { View view = ContentVideoView.getContentVideoView(); return view != null && view.getContext() == this; }