paulrouget / dzslides

DZSlides is a one-file HTML template to build slides in HTML5 and CSS3.
http://paulrouget.com/dzslides
939 stars 255 forks source link

Adding fullscreen support (#28) #55

Closed hsablonniere closed 12 years ago

hsablonniere commented 12 years ago

I added a simple implementation of what we discussed in #28.

Can you review and merge please.

paulrouget commented 12 years ago

So you are adding the feature to embedder. Do we want this in template as well? We might want to add this to the protocol, and just send a message from the embedder. And bind the "F" key in template to toggle Fullscreen?

hsablonniere commented 12 years ago

Works for me, I'll rewrite the code ASAP...

I'll also bind the key event on the embedder for focus purposes.

hsablonniere commented 12 years ago

I've done some reading and lots of tests.

http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#api https://developer.mozilla.org/en/DOM/Using_full-screen_mode

It's appears that triggering a fullscreen when the request doesn't come from a user event doesn't work. A bit like window.open It means it can't be done using the protocol. It would have been great to launch fullscreen for remote in onstage shell.

I updated the code a little bit to allow template to go fullscreen by pressing "F" key. I added attributes on embedder iframe to allow this behaviour when focus is on slides.

I don't think we can do better...

paulrouget commented 12 years ago

You're very right. I forgot about that.

Code looks good. Feel free to merge, but remove the comment <!--<iframe></iframe>--> first.

hsablonniere commented 12 years ago

I rebased the code and removed the comments...

paulrouget commented 12 years ago

(thx!)