A cross-browser fullscreen API for HTML5 video players
npm install video-fullscreen



> A cross-browser fullscreen API for HTML5 video players
```
npm install --save video-fullscreen
`javascript`
import fullscreen from 'video-fullscreen';
#### .request({ el, video })
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.
#### .exit()
Exits fullscreen.
#### .toggle({ el, video })
Toggles fullscreen.
el:HTMLElement The element to toggle. Defaults to the document element.
video:HTMLVideoElement The video element to toggle.
#### .isFullscreen({ el, video })
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.
#### .onChange(listener)
Adds a listener for the fullscreen change event.
#### .offChange(listener)
Removes a listener from the fullscreen change event.
#### .onError(listener)
Adds a listener for the fullscreen error event.
#### .offError(listener)
Removes a listener from the fullscreen error event.
#### .element
Gets the element that is currently in fullscreen mode, otherwise null.
#### .enabled
Checks whether fullscreen is enabled.
#### .api
Gets the internal mapping of the browser supported fullscreen API, otherwise null`.
MIT