chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.36k stars 467 forks source link

Proposal: Make Flash full-screen video behave like HTML5 fill-screen video #2010

Closed magreenblatt closed 5 years ago

magreenblatt commented 8 years ago

Original report by luis (Bitbucket: luiscef).


What steps will reproduce the problem?

open a website with any flashpalyer ,click the full screen button,flash will popup its own window.

What is the expected output? What do you see instead?

expected:the cefsimple demo use its window to show the full-screen flashplayer as Chrome does. I see instead :the flash create its own window.

What version of the product are you using? On what operating system? version:cef_binary_3.2272.32 system win 10 x64

attachments: 11.jpg is full-screen mode in Chrome 22.jpg is full-screen mode in cefsimple

magreenblatt commented 8 years ago

3.2272 is very old. Modern versions of CEF should have the same Flash behavior as modern versions of Chrome.

magreenblatt commented 7 years ago

Original comment by luis (Bitbucket: luiscef).


Get version :2883 the flash fullscreen window get a new parent window (class = Chrome_WidgetWin_0) ,but not use its own window. can we do something about this just like cef did for H5player fullscreen mode.

magreenblatt commented 7 years ago

Original comment by Yaroslav Shuper (Bitbucket: y_shuper).


I confirm this is an existing issue in window mode in all recent versions of CEF. I am willing to help with this issue as much as I can. By doing little bit of research: there was fix for the off screen rendering Issue 1648

Because of the code in libcef/browser/browser_host_impl.cc

#!c++

bool CefBrowserHostImpl::EmbedsFullscreenWidget() const {

  // When using windowless rendering do not allow Flash to create its own full-

  // screen widget.

 return IsWindowless();

}

It will return true only when CEF is running in windowless mode. This method on windows is called from here so when CEF is running in OSR mode

#!c++

widget_host_view->InitAsChild(GetRenderWidgetHostView()->GetNativeView());

is executed, it creates child window and adds into the browser area. Otherwise it will create fullscreen widget for flashplayer.

I tried to force EmbedsFullscreenWidget to return true and compiled cefclient application for testing. When flashplayer entered fullscreen mode browser window got maximised, however flashplayer did not appear.

#!c++
bool CefBrowserHostImpl::EmbedsFullscreenWidget() const {
 return true;
}

What is required to make created flashplayer child widget visible in window mode? And what is so different in OSR implementation?

magreenblatt commented 7 years ago

Original comment by luis (Bitbucket: luiscef).


Tried this.

#!c++

bool CefBrowserHostImpl::EmbedsFullscreenWidget() const {
 return true;
}

The new widget is created as child window.But the client rect is 0x0,so we cannot see that..

magreenblatt commented 7 years ago

What exactly are you requesting?

Flash full-screen mode works for me with 2883 branch on Windows 10.

  1. Run cefclient.exe --enable-system-flash
  2. Load https://student.testmasters.com/portal/online/Test.aspx
  3. Click the full-screen button.

I see a full-screen window with the Flash video playing.

magreenblatt commented 7 years ago

When using windowed rendering (and not off-screen rendering) the CefDisplayHandler::OnFullscreenModeChange callback is for HTML5 video only. Flash video with windowed rendering has always owned and managed its own full-screen window. See comments at #562/cef3-new-feature-need-to-support#comment-18599944

magreenblatt commented 7 years ago

Original comment by Yaroslav Shuper (Bitbucket: y_shuper).


So there is no way to stretch flash player to the size of the tab area on fullscreen? Like HTML5 video that gets resized to the size of the tab with address bar and other browser controls visible. And this is because FlashPlayer plugin renders only to fullscreen window and that window can not be embedded into tab area?

magreenblatt commented 7 years ago

Original comment by Yaroslav Shuper (Bitbucket: y_shuper).


what about this design document. Does is still assume using fullscreen window, not embedded?

magreenblatt commented 7 years ago

@y_shuper : I haven't looked into the implementation details since issue #562 was resolved. It's possible that something has changed since that time. If you are able to make Flash full-screen video behave like HTML5 fill-screen video without Chromium changes then you are welcome to submit a PR.

magreenblatt commented 5 years ago

Flash support has been deprecated and we do not plan to address Flash-related issues. See https://www.chromium.org/flash-roadmap for more information.

magreenblatt commented 8 years ago

Original changes by luis (Bitbucket: luiscef).


magreenblatt commented 8 years ago
magreenblatt commented 7 years ago

Original changes by luis (Bitbucket: luiscef).


magreenblatt commented 7 years ago
magreenblatt commented 5 years ago