jellyfin-web/dashboard-ui/bower_components/emby-webcomponents/resourcelocks/resourcelockmanager.js
Luke Pulverenti 8a6884abef minify
2017-01-27 18:07:14 -05:00

1 line
564 B
JavaScript

define([],function(){"use strict";function getRequirePromise(deps){return new Promise(function(resolve,reject){require(deps,resolve)})}function requestResourceLock(resource){return getRequirePromise([resource]).then(function(factory){return new factory})}function request(type){switch(type){case"wake":return requestResourceLock("wakeLock");case"screen":return requestResourceLock("screenLock");case"network":return requestResourceLock("networkLock");default:return Promise.reject()}return Promise.resolve(new ResourceLockInstance(type))}return{request:request}});