fullscreen.js
v0.3.0
Published
simple browser full screen library, compatible with common mainstream browsers
Downloads
9
Maintainers
Readme
fullscreen.js
simple browser full screen library, compatible with common mainstream browsers
Demo
Install
npm install fullscreen.js --save
// or
<script src='./fullscreen.min.js'></script>
Usage
import fullscreen from "fullscreen.js";
// or
// var fullscreen = require('fullscreen.js');
fullscreen.request();
API
fullscreen.is()
: whether it's full screen statusfullscreen.enabled()
: whether it's support full screen modefullscreen.listen(callback)
: add full screen event listener
fullscreen.listen(function () {
// whether it's full screen status
fullscreen.is();
});
fullscreen.request()
: request full screenfullscreen.exit()
: exit full screen