unfrev / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

Add support for OnFullscreenModeChange callback #120

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I've submitted a patch to add an OnFullscreenModeChange callback to CEF
http://code.google.com/p/chromiumembedded/issues/detail?id=562#c16

This is the corresponding patch for cefpython, in the hope that Marshall 
accepts my patch or some variation of it.

Original issue reported on code.google.com by finn.hug...@gmail.com on 28 Mar 2014 at 12:58

Attachments:

GoogleCodeExporter commented 8 years ago
I don't think your patch will be accepted, because:

1. Your usage is questionable. I don't see a public method exposed to switch 
into fullscreen mode. Only a callback when fullscreen mode is detected. It's a 
riddle to me what is the usage for that.

2. You have provided implementation only for Linux. Windows and OSX are missing.

Either way I wouldn't worry about your patch being rejected, because CEF Issue 
`562` is labeled as `NextRelease`, so it is going to be implemented by Marshall 
for the next release.

Original comment by czarek.t...@gmail.com on 28 Mar 2014 at 1:19

GoogleCodeExporter commented 8 years ago
On a side note, CEF Python supports going into fullscreen mode, but only on 
Windows. The methods are: Browser.`ToggleFullscreen()` and 
Browser.`IsFullscreen()`.

Original comment by czarek.t...@gmail.com on 28 Mar 2014 at 1:21

GoogleCodeExporter commented 8 years ago
Thanks Czarek,

The patch is to support websites that use the js fullscreen method, before the 
patch parts are fullscreened and parts not. Ideally the callback should allow 
you to refuse the fullscreen request, but at least this patch allows the 
fullscreen request to succeed. Note, I don't disagree with you that Marshall is 
unlikely to accept the patch I just wanted to point out that there is a good 
reason this is helpful to me.

Original comment by finn.hug...@gmail.com on 28 Mar 2014 at 1:25

GoogleCodeExporter commented 8 years ago
I wasn't aware of HTML5 fullscreen API. How do I use it in Chromium? I've tried 
document.body.webkitRequestFullScreen() but with no effect.

Original comment by czarek.t...@gmail.com on 28 Mar 2014 at 1:40

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I'm only using it to allow third party html5 videos to fullscreen themselves so 
haven't had to concern myself with how to code it.
My usual test case is to find a youtube HTML5 video but this works too
http://updates.html5rocks.com/2011/10/Let-Your-Content-Do-the-Talking-Fullscreen
-API

Original comment by finn.hug...@gmail.com on 28 Mar 2014 at 1:52

GoogleCodeExporter commented 8 years ago
Ah, just read your comment more closely, I'd think you just need to drop 
"webkit" from that function :)

Original comment by finn.hug...@gmail.com on 28 Mar 2014 at 1:54

GoogleCodeExporter commented 8 years ago
When executing document.body.webkitRequestFullscreen() from within devtools it 
has no effect. When I pasted 
"javascript:document.body.webkitRequestFullscreen();" into url then it worked 
fine. So it looks like this is some limitation/bug in devtools.

Original comment by czarek.t...@gmail.com on 28 Mar 2014 at 2:14

GoogleCodeExporter commented 8 years ago
Project will move to Github. Find this issue at the new address (soon): 
https://github.com/cztomczak/cefpython/issues/120

Original comment by czarek.t...@gmail.com on 24 Aug 2015 at 6:38