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

Posts: 16
Registered: ‎07-19-2012
My Device: BB10 dev alpha
My Carrier: Sosh (Orange subsidiary)

How to play a video fullscreen?



My WebWorks app for BlackBerry 10 is displaying a video like this:

<video width="342" height="193" poster="http://www.example.com/m_img_0005.jpg" controls="" class="video-js vjs-default-skin" data-setup="{}" style="display: block;"><source src="http://www.example.com/M3G.mp4" type="video/mp4"></video>


On top of the video, there is an  overlay:

<div class="overlay">
<a href="#" class="replay">Play</a>


There is a click event handler attached to the Play button. When executed, we simply call .play() on the DOM video element. The video always starts but sometimes in fullscreen and otherwise "inline" (in the page).


I've tried to force the video play fullscreen by using videoElement.webkitRequestFullscreen() and videoElement.webkitEnterFullscreen() but no luck.


Do you see how BlackBerry OS make the decision about whether to play the video fullscreen or not?

Cross-device app developer.