Hi,
I updated CEF4DElphi and added the fullscreen code to the MiniBrowser demo.
Download it and take a look at the TMiniBrowserFrm.Chromium1FullScreenModeChange procedure.
That event only informs the application that some element in the web page is in fullscreen mode or not.
The application can optionally adjust its size to the screen size.
Play a youtube video and press the fullscreen button to try it.
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Fullscreen mode in window
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Fullscreen mode in window
The fullscreen variable inside the onFullScreenModeChange event is not used that way.yvesr wrote: Thu May 18, 2017 3:57 pm in the event I force FullScreen := False; to stay in window mode.
event onFullScreenModeChange work with www.Youtube.com
You can only read its value. Modifying that variable has no effect.
I'm using the MiniBrowser demo with the official CEF3 binaries without proprietary codec support and this is what I see :yvesr wrote: Thu May 18, 2017 3:57 pm but if you use this website player, it's won't
https://www.bloomberg.com/live/us
there is no event onFullScreenModeChange
any idea with the event is not firing ?
If I disable Flash, the bloomberg website gives an error and the DevTools console has this message :
If I enable Flash with the Adobe Flash Player already installed, then the bloomberg website shows the video using Flash and everything works correctly. The video is playing and the onFullScreenModeChange event works as expected.cdn.gotraffic.net/projector/v0.11.61/vendor.js:65 VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) An error has occurred. Reload the web page or use another browser.
Error 5
I'm not sure why we have different results with the bloomberg website. Maybe Bloomberg is sending different video contents for each geographic location.
I've also tried these videos :
http://html5demos.com/video
https://www.w3schools.com/html/html5_video.asp
http://techslides.com/demos/sample-videos/small.webm
http://justinwhitney.com/HTML5Example/ <--- the first video here uses H.264 and it doesn't work but the others work.
In all the videos that use open source codecs the fullscreen event works as expected.
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Fullscreen mode in window
I've never tried that but I think that you don't need the onFullScreenModeChange event.
If you are using the TCEFWindowParent component you would only need to set its align property to alNone and then change the TCEFWindowParent width and height to whatever you want.
If the form is not big enough you'll see a clipped video but cef will stretch the video to the custom width and height of TCEFWindowParent when you click the full screen button inside the video player.
If you are using the TCEFWindowParent component you would only need to set its align property to alNone and then change the TCEFWindowParent width and height to whatever you want.
If the form is not big enough you'll see a clipped video but cef will stretch the video to the custom width and height of TCEFWindowParent when you click the full screen button inside the video player.
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Fullscreen mode in window
After a few more tests it seems to be an Adobe Flash Player problem.
This problem only shows up when the when the web page uses the Adobe Flash Player and the form has a formStyle = fsStayOnTop or you use SetWindowPos with HWND_TOPMOST.
Other web pages with HTML5 videos and formStyle = fsStayOnTop work as expected.
I also tested this in BriskBard modifying the formStyle = fsStayOnTop property and then I loaded https://www.bloomberg.com/live/us inside a TRIDENT tab (Internet explorer)
The video also used Adobe Flash Player and when I clicked the "fullscreen" button I had the same problem!
The video started playing in the background outside the main form even when I used a different rendering engine!
I'm not an expert in Adobe Flash Player but this might help you :
http://www.adobe.com/devnet/flashplayer ... _mode.html
This problem only shows up when the when the web page uses the Adobe Flash Player and the form has a formStyle = fsStayOnTop or you use SetWindowPos with HWND_TOPMOST.
Other web pages with HTML5 videos and formStyle = fsStayOnTop work as expected.
I also tested this in BriskBard modifying the formStyle = fsStayOnTop property and then I loaded https://www.bloomberg.com/live/us inside a TRIDENT tab (Internet explorer)
The video also used Adobe Flash Player and when I clicked the "fullscreen" button I had the same problem!

The video started playing in the background outside the main form even when I used a different rendering engine!

I'm not an expert in Adobe Flash Player but this might help you :
http://www.adobe.com/devnet/flashplayer ... _mode.html