jellyfin-web/dashboard-ui/thirdparty/cordova/connectsdk.js
2015-06-08 17:32:20 -04:00

36 lines
907 B
JavaScript

(function () {
function initSdk() {
var manager = ConnectSDK.discoveryManager;
//manager.setPairingLevel(ConnectSDK.PairingLevel.OFF);
manager.setAirPlayServiceMode(ConnectSDK.AirPlayServiceMode.Media);
// Show devices that support playing videos and pausing
//manager.setCapabilityFilters([
// new ConnectSDK.CapabilityFilter(["MediaPlayer.Display.Video", "MediaControl.Pause"])
//]);
manager.on('devicelistchanged', onDeviceListChanged);
manager.startDiscovery();
requirejs(['thirdparty/cordova/chromecast', 'thirdparty/cordova/generaldevice']);
}
function onDeviceListChanged(list) {
}
function getDeviceList() {
return ConnectSDK.discoveryManager.getDeviceList();
}
window.ConnectHelper = {
getDeviceList: getDeviceList
};
Dashboard.ready(initSdk);
})();