emby.idonthaveagmail.com Open in urlscan Pro
66.181.119.213  Public Scan

Submitted URL: http://emby.idonthaveagmail.com/web/modules/confirmstillplaying/plugin.js?v=4.9.0.24
Effective URL: https://emby.idonthaveagmail.com/web/modules/confirmstillplaying/plugin.js?v=4.9.0.24
Submission: On October 29 via api from US — Scanned from CA

Form analysis 0 forms found in the DOM

Text Content

define(["exports","./../common/globalize.js","./../emby-apiclient/events.js","./../common/usersettings/usersettings.js","./../common/inputmanager.js","./../common/playback/playbackmanager.js","./../input/mouse.js","./../common/methodtimer.js"],function(_exports,_globalize,_events,_usersettings,_inputmanager,_playbackmanager,_mouse,_methodtimer){function confirmStillPlaying(){var options,minIdleTime=_usersettings.default.stillWatchingTimeMs();return minIdleTime<=0||_inputmanager.default.idleTime()<minIdleTime||Date.now()-_mouse.default.lastMouseInputTime()<minIdleTime?Promise.resolve():(options={title:null,text:_globalize.default.translate("AreYouStillWatching"),confirmText:_globalize.default.translate("HeaderContinueWatching"),cancelText:_globalize.default.translate("Stop"),cancelResult:"cancel",timeout:6e4},Emby.importModule("./modules/common/dialogs/confirm.js").then(function(confirm){return confirm(options)}))}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=function(){var confirmTimeout;function clearConfirmTimer(){confirmTimeout&&(confirmTimeout.destroy(),confirmTimeout=null)}function onConfirmTimeout(){confirmStillPlaying().catch(function(result){"cancel"!==result&&"_timeout"!==result||_playbackmanager.default.stop()})}this.name="Are You Still Watching?",this.type="preplayintercept",this.id="stillplaying",this.intercept=function(options){return clearConfirmTimer(),"Video"===options.mediaType&&options.fullscreen?confirmStillPlaying():Promise.resolve()},_events.default.on(_playbackmanager.default,"playbackstart",function(e,player,state){"Video"===(state.NowPlayingItem||{}).MediaType&&player.isLocalPlayer&&!player.isExternalPlayer&&0<_usersettings.default.stillWatchingTimeMs()?(clearConfirmTimer(),confirmTimeout=new _methodtimer.default({onInterval:onConfirmTimeout,timeoutMs:3e4,type:"interval"})):clearConfirmTimer()}),_events.default.on(_playbackmanager.default,"playbackstop",clearConfirmTimer)}});