Re: [whatwg] Entering fullscreen when already in fullscreen mode [was: Fullscreen]
On Tue, 18 Oct 2011 10:33:42 +0900, Anne van Kesteren ann...@opera.com wrote: Site A embeds site B. Site A goes fullscreen. Site B does requestFullscreen(). Site B does exitFullscreen(). Site A is no longer fullscreen. Either we need to base fullscreen on browsing contexts rather than top-level browsing contexts (how?) or give up on this use case. On IRC we discussed a solution to this model. Basically a document in which requestFullscreen() was invoked would have a flag set, so descendant documents could invoke requestFullscreen() and when exitFullscreen() on such a descendant document was invoked it would stop displaying ancestor (and any descendant) documents in fullscreen up until the first one that has the flag set. In addition there would be a fullscreen element and an original fullscreen element for each document so when exitFullscreen() is invoked you can reset the fullscreen element appropriately. However, I just realized this does not work for the single document case. You have a video player website and you host your videos in video or maybe a div container. So your video player website is displayed fullscreen, because your users like the fullscreen application feel from their OS, but then they click to display one of those videos fullscreen and once they hit exit the video player website is also no longer displayed fullscreen. Anyone any ideas? -- Anne van Kesteren http://annevankesteren.nl/
Re: [whatwg] Entering fullscreen when already in fullscreen mode [was: Fullscreen]
On Tue, Oct 18, 2011 at 3:55 AM, Anne van Kesteren ann...@opera.com wrote: However, I just realized this does not work for the single document case. You have a video player website and you host your videos in video or maybe a div container. So your video player website is displayed fullscreen, because your users like the fullscreen application feel from their OS, but then they click to display one of those videos fullscreen and once they hit exit the video player website is also no longer displayed fullscreen. Do you mean the user-fullscreen mode that most browsers enter with F11? That's a separate piece of state entirely, since it affects the whole browser window, not individual tabs. (You should still be able to enterFullscreen and exitFullscreen, to set and clear the fullscreen element. It just wouldn't change the browser window's actual fullscreen status.) -- Glenn Maynard
Re: [whatwg] Entering fullscreen when already in fullscreen mode [was: Fullscreen]
On Tue, Oct 18, 2011 at 7:24 AM, Glenn Maynard gl...@zewt.org wrote: On Tue, Oct 18, 2011 at 3:55 AM, Anne van Kesteren ann...@opera.com wrote: However, I just realized this does not work for the single document case. You have a video player website and you host your videos in video or maybe a div container. So your video player website is displayed fullscreen, because your users like the fullscreen application feel from their OS, but then they click to display one of those videos fullscreen and once they hit exit the video player website is also no longer displayed fullscreen. Do you mean the user-fullscreen mode that most browsers enter with F11? That's a separate piece of state entirely, since it affects the whole browser window, not individual tabs. (You should still be able to enterFullscreen and exitFullscreen, to set and clear the fullscreen element. It just wouldn't change the browser window's actual fullscreen status.) In Chrome, the user-fullscreen mode you get when you press F11 places the active tab into fullscreen mode. It is interesting to wonder how this API should interact with user-fullscreen mode. However, maybe that is best left to the UAs and shouldn't be covered by this spec. -Darin
Re: [whatwg] Entering fullscreen when already in fullscreen mode [was: Fullscreen]
On Mon, 17 Oct 2011, Darin Fisher wrote: On Mon, Oct 17, 2011 at 4:31 PM, Anne van Kesteren ann...@opera.com wrote: On Tue, 18 Oct 2011 08:11:41 +0900, Darin Fisher da...@chromium.org wrote: OK, I can't help myself. One more question: What should happen if the fullscreen browsing context is navigated? What happens if the document, containing the fullscreen element, is destroyed? Perhaps it should bounce out of fullscreen mode? The current plan is that if any of the browsing contexts with non-null fullscreen element is navigated you exit fullscreen. I agree. That's the only sane behavior. I'm going to implement that behavior for Chrome. Presumably this should happen after the step in the navigation algorithm where it is established that we are going to another document (i.e. not just for #fragment navigations). Should it happen before or after onbeforeunload and onunload? Should it just happen when the session history is updated (i.e. when the page load changes the rendering), or at some other point? -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Re: [whatwg] Entering fullscreen when already in fullscreen mode [was: Fullscreen]
On Tue, 18 Oct 2011 23:24:27 +0900, Glenn Maynard gl...@zewt.org wrote: Do you mean the user-fullscreen mode that most browsers enter with F11? Not necessarily. You run into the same issue with requestFullscreen() usage. That's a separate piece of state entirely, since it affects the whole browser window, not individual tabs. (You should still be able to enterFullscreen and exitFullscreen, to set and clear the fullscreen element. It just wouldn't change the browser window's actual fullscreen status.) I think it would be kind of nice if the UI and API-based fullscreen were aligned. Otherwise you run into all kinds of odd situations. E.g. API-based fullscreen first. Then via native video controls you go UI-based fullscreen for a video displayed on that page. What happens when you exit? You can have the same scenario the other way around, or both can be done using solely the UI, or both can be done using solely the API. It would be confusing to users I think if you got different results here. -- Anne van Kesteren http://annevankesteren.nl/
Re: [whatwg] Entering fullscreen when already in fullscreen mode [was: Fullscreen]
On Tue, Oct 18, 2011 at 9:23 PM, Anne van Kesteren ann...@opera.com wrote: I think it would be kind of nice if the UI and API-based fullscreen were aligned. Otherwise you run into all kinds of odd situations. E.g. API-based fullscreen first. Then via native video controls you go UI-based fullscreen for a video displayed on that page. What happens when you exit? You can have the same scenario the other way around, or both can be done using solely the UI, or both can be done using solely the API. It would be confusing to users I think if you got different results here. It'd be nice if native video fullscreen buttons could be implemented using the fullscreen API directly. A really nice side-effect would be that scripted video controls could behave exactly the same as native controls (possibly excluding permission checks), including document.fullscreenElement and the fullscreenchanged event. It seems like it would need fullscreenElement to be a stack, though, so exitFullscreen can drop back into the previous fullscreen state. -- Glenn Maynard
[whatwg] Entering fullscreen when already in fullscreen mode [was: Fullscreen]
Hi Anne, Thanks for working on this spec! I have more questions, but I'll just start with one. If enterFullscreen() is called when the browsing context is already being displayed fullscreen, what should happen? (It looks like Safari 5.1 ignores the second call to webkitRequestFullScreen.) I also find it curious that there is a bit of a dead-time between the request to enter fullscreen and the fullscreenchange event (nit: fullscreenchange instead of fullscreenchanged to be consistent, right?). It appears that JS cannot request to cancel out of fullscreen mode until the fullscreenchange event is generated (i.e., until the fullscreen flag is set). It could cause pain for developers if there is no guaranteed response to enterFullscreen(). Did my request succeed, did it fail? What happened? -Darin On Fri, Oct 14, 2011 at 9:27 PM, Anne van Kesteren ann...@opera.com wrote: I wrote up a draft: http://dvcs.w3.org/hg/**fullscreen/raw-file/tip/**Overview.htmlhttp://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html Defining when exactly the fullscreen enabled flag is set for Document objects I will leave up to HTML. As well as defining the allowfullscreen attribute. Presumably it should be set for Document objects associated with the top-level browsing context and descendant browsing context as long as their browsing context container has the aforementioned attribute set. If we want to transition from fullscreen when navigating, HTML can define that as well, neatly integrated in the navigation section. The Model section of the Fullscreen specification has an appropriate hook. I have not added the key restrictions given earlier emails. Unfortunately there was not that much feedback on them, but maybe this draft will help on that front! I went with fullscreen rather than full screen as that seemed cleaner and easier to type. I also used enter and exit rather than request and cancel as they seemed somewhat nicer too. I'm less attached to this latter change though. -- Anne van Kesteren http://annevankesteren.nl/
Re: [whatwg] Entering fullscreen when already in fullscreen mode [was: Fullscreen]
OK, I can't help myself. One more question: What should happen if the fullscreen browsing context is navigated? What happens if the document, containing the fullscreen element, is destroyed? Perhaps it should bounce out of fullscreen mode? -Darin On Mon, Oct 17, 2011 at 3:55 PM, Darin Fisher da...@chromium.org wrote: Hi Anne, Thanks for working on this spec! I have more questions, but I'll just start with one. If enterFullscreen() is called when the browsing context is already being displayed fullscreen, what should happen? (It looks like Safari 5.1 ignores the second call to webkitRequestFullScreen.) I also find it curious that there is a bit of a dead-time between the request to enter fullscreen and the fullscreenchange event (nit: fullscreenchange instead of fullscreenchanged to be consistent, right?). It appears that JS cannot request to cancel out of fullscreen mode until the fullscreenchange event is generated (i.e., until the fullscreen flag is set). It could cause pain for developers if there is no guaranteed response to enterFullscreen(). Did my request succeed, did it fail? What happened? -Darin On Fri, Oct 14, 2011 at 9:27 PM, Anne van Kesteren ann...@opera.comwrote: I wrote up a draft: http://dvcs.w3.org/hg/**fullscreen/raw-file/tip/**Overview.htmlhttp://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html Defining when exactly the fullscreen enabled flag is set for Document objects I will leave up to HTML. As well as defining the allowfullscreen attribute. Presumably it should be set for Document objects associated with the top-level browsing context and descendant browsing context as long as their browsing context container has the aforementioned attribute set. If we want to transition from fullscreen when navigating, HTML can define that as well, neatly integrated in the navigation section. The Model section of the Fullscreen specification has an appropriate hook. I have not added the key restrictions given earlier emails. Unfortunately there was not that much feedback on them, but maybe this draft will help on that front! I went with fullscreen rather than full screen as that seemed cleaner and easier to type. I also used enter and exit rather than request and cancel as they seemed somewhat nicer too. I'm less attached to this latter change though. -- Anne van Kesteren http://annevankesteren.nl/
Re: [whatwg] Entering fullscreen when already in fullscreen mode [was: Fullscreen]
On Tue, 18 Oct 2011 07:55:33 +0900, Darin Fisher da...@chromium.org wrote: Thanks for working on this spec! I have more questions, but I'll just start with one. If enterFullscreen() is called when the browsing context is already being displayed fullscreen, what should happen? (It looks like Safari 5.1 ignores the second call to webkitRequestFullScreen.) Chris is suggesting this should move the current fullscreen element around. A use case I can think of is where you have YouTube fullscreen while browsing through videos and then want to highlight a particular video. It does however generate quite a bit of complexity in edge cases where you have a tree of Documents. In that case you need to find the common ancestor of the current fullscreen element and the new fullscreen element, make changes to the Documents on that path from current to new, and dispatch events. I also find it curious that there is a bit of a dead-time between the request to enter fullscreen and the fullscreenchange event (nit: fullscreenchange instead of fullscreenchanged to be consistent, right?). Agreed that it should be ending in change. It appears that JS cannot request to cancel out of fullscreen mode until the fullscreenchange event is generated (i.e., until the fullscreen flag is set). It could cause pain for developers if there is no guaranteed response to enterFullscreen(). Did my request succeed, did it fail? What happened? The idea is to have an event, also asynchronous, that is dispatched when the invocation did not succeed. Naming ideas so far: fullscreendeny and fullscreenerror. -- Anne van Kesteren http://annevankesteren.nl/
Re: [whatwg] Entering fullscreen when already in fullscreen mode [was: Fullscreen]
On Tue, 18 Oct 2011 08:11:41 +0900, Darin Fisher da...@chromium.org wrote: OK, I can't help myself. One more question: What should happen if the fullscreen browsing context is navigated? What happens if the document, containing the fullscreen element, is destroyed? Perhaps it should bounce out of fullscreen mode? The current plan is that if any of the browsing contexts with non-null fullscreen element is navigated you exit fullscreen. -- Anne van Kesteren http://annevankesteren.nl/
Re: [whatwg] Entering fullscreen when already in fullscreen mode [was: Fullscreen]
On 18/10/2011 12:52 p.m., Darin Fisher wrote: On Mon, Oct 17, 2011 at 4:17 PM, Anne van Kesterenann...@opera.com wrote: On Tue, 18 Oct 2011 07:55:33 +0900, Darin Fisherda...@chromium.org wrote: Thanks for working on this spec! I have more questions, but I'll just start with one. If enterFullscreen() is called when the browsing context is already being displayed fullscreen, what should happen? (It looks like Safari 5.1 ignores the second call to webkitRequestFullScreen.) Chris is suggesting this should move the current fullscreen element around. A use case I can think of is where you have YouTube fullscreen while browsing through videos and then want to highlight a particular video. It does however generate quite a bit of complexity in edge cases where you have a tree of Documents. In that case you need to find the common ancestor of the current fullscreen element and the new fullscreen element, make changes to the Documents on that path from current to new, and dispatch events. This seems like it might be overly complicated. I could be mistaken, but I don't think YouTube needs this. Yeah, I suggest that if requestFullScreen() is called when another element is already the fullscreen element, the new requestee should become the fullscreen element. A use case for this is: a fullscreen page with a cross-domain video and the video wants to go fullscreen. For example if a slide-deck/PowerPoint clone webapp goes fullscreen and wants to make an embedded YouTube video fullscreen. The easiest way to do this is load the YouTube video in an embedded iframe and (assuming you're using their HTML5 player and that uses the fullscreen API) click on the fullscreen button in its controls UI. Regards, Chris Pearce.
Re: [whatwg] Entering fullscreen when already in fullscreen mode [was: Fullscreen]
On Tue, 18 Oct 2011 10:00:51 +0900, Chris Pearce cpea...@mozilla.com wrote: Yeah, I suggest that if requestFullScreen() is called when another element is already the fullscreen element, the new requestee should become the fullscreen element. A use case for this is: a fullscreen page with a cross-domain video and the video wants to go fullscreen. For example if a slide-deck/PowerPoint clone webapp goes fullscreen and wants to make an embedded YouTube video fullscreen. The easiest way to do this is load the YouTube video in an embedded iframe and (assuming you're using their HTML5 player and that uses the fullscreen API) click on the fullscreen button in its controls UI. As I explained on IRC this use case does not work well. Site A embeds site B. Site A goes fullscreen. Site B does requestFullscreen(). Site B does exitFullscreen(). Site A is no longer fullscreen. Either we need to base fullscreen on browsing contexts rather than top-level browsing contexts (how?) or give up on this use case. -- Anne van Kesteren http://annevankesteren.nl/