2015-05-18 12:40:20 -04:00
|
|
|
|
(function () {
|
|
|
|
|
|
|
|
|
|
function initSdk() {
|
|
|
|
|
|
|
|
|
|
var manager = ConnectSDK.discoveryManager;
|
|
|
|
|
|
2015-05-19 15:15:40 -04:00
|
|
|
|
//manager.setPairingLevel(ConnectSDK.PairingLevel.OFF);
|
2015-06-04 16:27:46 -04:00
|
|
|
|
manager.setAirPlayServiceMode(ConnectSDK.AirPlayServiceMode.Media);
|
2015-05-18 12:40:20 -04:00
|
|
|
|
|
|
|
|
|
// Show devices that support playing videos and pausing
|
2015-05-18 18:23:03 -04:00
|
|
|
|
//manager.setCapabilityFilters([
|
|
|
|
|
// new ConnectSDK.CapabilityFilter(["MediaPlayer.Display.Video", "MediaControl.Pause"])
|
|
|
|
|
//]);
|
2015-05-18 12:40:20 -04:00
|
|
|
|
|
2015-06-08 17:32:20 -04:00
|
|
|
|
manager.on('devicelistchanged', onDeviceListChanged);
|
|
|
|
|
|
2015-05-18 18:23:03 -04:00
|
|
|
|
manager.startDiscovery();
|
|
|
|
|
|
2015-06-20 00:48:45 -04:00
|
|
|
|
requirejs(['cordova/chromecast', 'cordova/generaldevice']);
|
2015-05-18 12:40:20 -04:00
|
|
|
|
}
|
|
|
|
|
|
2015-06-08 17:32:20 -04:00
|
|
|
|
function onDeviceListChanged(list) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getDeviceList() {
|
|
|
|
|
return ConnectSDK.discoveryManager.getDeviceList();
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-12 23:42:19 -04:00
|
|
|
|
window.ConnectSDKHelper = {
|
2015-06-08 17:32:20 -04:00
|
|
|
|
|
|
|
|
|
getDeviceList: getDeviceList
|
|
|
|
|
};
|
|
|
|
|
|
2015-05-19 15:15:40 -04:00
|
|
|
|
Dashboard.ready(initSdk);
|
2015-05-18 12:40:20 -04:00
|
|
|
|
|
|
|
|
|
})();
|