If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Visitor
DrMalcolm
Posts: 1
Registered: ‎02-22-2013
My Device: Developer
My Carrier: Rogers

BB10 Browser and the WebKit FullScreen Api

Hi there.

 

I noticed that the BB10 browser has some support for the Fullscreen javascript api
http://robertnyman.com/2012/03/08/using-the-fullscreen-api-in-web-browsers/

https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html

 

However, I have not been able to get it to work, whether I use element.requestFullscreen(), element.requestFullScreen() or element.webkitRequestFullScreen();

 

 

I know this specification is still in draft stage, but has anyone been successful in using this api on BB10 yet? Does the BB10 browser just use a different function name?

 

Thanks!

Please use plain text.
BlackBerry Development Advisor
anzor_b
Posts: 164
Registered: ‎09-24-2012
My Device: White BlackBerry 10
My Carrier: Bell

Re: BB10 Browser and the WebKit FullScreen Api

Hi DrMalcolm,

 

The BB10 browser does support full-screen. Here's a snippet from a test I've performed that toggles fullscreen for a video tag - similarly you should be able to use any other tag (but only when using video tag do you get the native player controls in fullscreen):

 

var video= document.getElementById("video1");

fsButton.addEventListener('click', function() {

video.webkitRequestFullScreen();
});

We also support querying full screen state, so you can create custom controls with ease:

 

    if(!document.webkitIsFullScreen) {
element.webkitRequestFullScreen();
} else {
document.webkitCancelFullScreen();
}

 

Let me know if this works for you,

 

Cheers.

A.

 

Please use plain text.