define(["exports","./../emby-apiclient/events.js","./../dom.js"],function(_exports,_events,_dom){function fullscreenManager(){}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,fullscreenManager.prototype.requestFullscreen=function(element){return(element=element||document.documentElement).requestFullscreen?element.requestFullscreen({navigationUI:"hide"}):(element.mozRequestFullScreen?element.mozRequestFullScreen():element.webkitRequestFullscreen?element.webkitRequestFullscreen():element.msRequestFullscreen?element.msRequestFullscreen():(element="VIDEO"!==element.tagName?document.querySelector("video")||element:element).webkitEnterFullscreen&&element.webkitEnterFullscreen(),Promise.resolve())},fullscreenManager.prototype.exitFullscreen=function(){return document.exitFullscreen?document.exitFullscreen():(document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.webkitCancelFullscreen?document.webkitCancelFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),Promise.resolve())},fullscreenManager.prototype.isFullScreen=function(){return!!(document.fullscreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement)};var manager=new fullscreenManager;function onFullScreenChange(){_events.default.trigger(manager,"fullscreenchange")}_dom.default.addEventListener(document,"fullscreenchange",onFullScreenChange,{passive:!0}),"onwebkitfullscreenchange"in document&&_dom.default.addEventListener(document,"webkitfullscreenchange",onFullScreenChange,{passive:!0});_exports.default=manager});