A cross-browser fullscreen API for HTML5 video players
npm install --save video-fullscreen
import fullscreen from 'video-fullscreen';
Requests fullscreen.
el:HTMLElement The element to make the request for. Defaults to the document element.
video:HTMLVideoElement The video element to make the request for.
Exits fullscreen.
Toggles fullscreen.
el:HTMLElement The element to toggle. Defaults to the document element.
video:HTMLVideoElement The video element to toggle.
Returns whether fullscreen is active for an element, or any element if one is not specified.
el:HTMLElement The element to check for fullscreen.
video:HTMLVideoElement The video element to check for fullscreen.
Adds a listener for the fullscreen change event.
Removes a listener from the fullscreen change event.
Adds a listener for the fullscreen error event.
Removes a listener from the fullscreen error event.
Gets the element that is currently in fullscreen mode, otherwise null
.
Checks whether fullscreen is enabled.
Gets the internal mapping of the browser supported fullscreen API, otherwise null
.
MIT