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