![](/uploads/1/2/5/7/125740254/584327840.jpg)
According to this article Google Chrome 15 has a fullscreen JavaScript API.
May 29, 2019 Making Fullscreen Experiences. Not all platforms are equal. IOS Safari doesn't have a fullscreen API, but we do on Chrome on Android, Firefox, and IE 11+. Most applications you build will use a combination of the JS API and the CSS selectors provided by the fullscreen specification. The main JS API's that you need to care about when building.
I have tried to make it work but failed. I have also searched for official documentation in vain.
What does the fullscreen JavaScript API look like?
Randomblue
Randomblue![Android Android](/uploads/1/2/5/7/125740254/753139298.png)
37.7k122122 gold badges295295 silver badges507507 bronze badges
5 Answers
The API only works during user interaction, so it cannot be used maliciously. Try the following code:
Dmitry Gonchar1,59822 gold badges1515 silver badges2525 bronze badges
Eli GreyEli Grey28.6k1212 gold badges6363 silver badges8787 bronze badges
I made a simple wrapper for the Fullscreen API, called screenfull.js, to smooth out the prefix mess and fix some inconsistencies in the different implementations. Check out the demo to see how the Fullscreen API works.
Click the green Download Player button above. Foot pedal setup wizard. .
Recommended reading:
Sindre SorhusSindre Sorhus59.4k2424 gold badges137137 silver badges191191 bronze badges
Here are some functions I created for working with fullscreen in the browser.
They provide both enter/exit fullscreen across most major browsers.
Alex Beals60622 gold badges88 silver badges2121 bronze badges
Drew NoakesDrew Noakes195k124124 gold badges537537 silver badges631631 bronze badges
The following test works in Chrome 16 (dev branch) on X86 and Chrome 15 on Mac OSX Lion
Mo KargasMo Kargas
In Google's closure library project , there is a module which has do the job , below is the API and source code.
monjermonjer2,17922 gold badges1616 silver badges2626 bronze badges
Not the answer you're looking for? Browse other questions tagged javascriptgoogle-chromefullscreen or ask your own question.
by Martin Brinkmann on June 13, 2017 in Google Chrome - Last Update: June 13, 2017 - 4 comments
Chrome for Android has a new feature that switches to fullscreen video mode automatically when you rotate the Android device.
Note: The feature is hidden behind an experimental flag right now, and only available in development versions of Chrome. I tested it in Chrome Canary, and have not found it yet in Chrome Stable. Also, this is an Android only feature that won't be available on desktop versions of Chrome.
If you play videos regularly on your Android device, you may do so in portrait mode, or in landscape mode. Landscape mode offers several advantages over portrait mode when it comes to watching videos, as the extra width it provides is better suited for media playback.
While you can rotate the phone on sites to make use of that, doing so won't launch a dedicated fullscreen mode to play the video. You get the browser's address bar, other page controls, and media controls displayed in that mode as well.
On YouTube for instance, you have to tap on the fullscreen button to launch that mode, and to get out of if, you have to interact with the page again.
Chrome rotate to fullscreen video mode
There are three prerequisites right now to use the rotate to fullscreen gesture fore videos mode on Chrome for Android:
- You must run Chrome Canary or another development version of Google Chrome on Android.
- You need to have rotation enabled, and not locked.
- You need to set a flag on Chrome's experimental flags page.
Setting the flag
Rotate-to-fullscreen gesture for videos
Enter/exit fullscreen when device is rotated to/from orientation of the video. Only on phones.
To enable the feature, do the following:
- Open the Google Chrome web browser on your Android device.
- Type chrome://flags in the browser's address bar and load the page.
- Tap on menu, select find on page, and type rotate.
- This should jump straight to the rotate-to-fullscreen gesture for videos flag.
- Tap on the menu underneath it, and set the status to enabled.
- Restart Google Chrome.
Once you have done so, you may test the functionality by visiting YouTube. There you may start playback of any video, and rotate your device to switch between fullscreen mode and regular mode using that rotate gesture.
The feature works nicely on YouTube, but may not work on other video streaming sites. (via Deskmodder)
Verdict
This looks like a handy feature to have, as you usually want to play a video in fullscreen mode when you rotate it. I'm not sure how Google will handle situations where this is not the case, or where users just want to use the functionality at times, but not all the time.
Chrome gets super-handy rotate to fullscreen video mode
Description
Chrome for Android has a new feature that switches to fullscreen video mode automatically when you rotate the Android device.
Author
Ghacks Technology News
Logo
Advertisement![](/uploads/1/2/5/7/125740254/584327840.jpg)