jellyfin-web/dashboard-ui/bower_components/emby-webcomponents/voice/commands/controlcommands.js

17 lines
399 B
JavaScript
Raw Normal View History

2016-07-06 12:25:58 -07:00
define(['playbackManager'], function (playbackManager) {
2016-10-17 22:06:48 -07:00
'use strict';
2016-07-06 12:25:58 -07:00
2016-07-06 13:16:56 -07:00
function setActiveDevice(name) {
return function () {
playbackManager.trySetActiveDeviceName(name);
};
}
2016-07-06 12:25:58 -07:00
return function (result) {
2016-07-06 13:16:56 -07:00
2016-07-06 12:25:58 -07:00
if (result.properties.devicename) {
2016-07-06 13:16:56 -07:00
return setActiveDevice(result.properties.devicename);
2016-07-06 12:25:58 -07:00
}
return;
2016-10-17 22:06:48 -07:00
};
2016-07-06 12:25:58 -07:00
});