mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
1 line
564 B
JavaScript
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}}); |