用户切换电视信号源时在应用上管理GCKDevices [英] Managing GCKDevices on app when user switch TV source
问题描述
iOS的Google Chrome Cast API具有以下设备发现方法
Google Chrome cast api of ios have the following methods of device discovery
- (void)deviceDidComeOnline:(GCKDevice *)device {
// : manipulate UI
[self.tableView reloadData];
}
- (void)deviceDidGoOffline:(GCKDevice *)device {
//: manipulate UI
[self.tableView reloadData];
}
在应用程序开始时运行良好,并且设备通常添加到UI中因为我添加了一个侦听器并在 startScan 方法通常运行5秒钟时开始扫描,但是如果现在我从电视切换了信号源或从电视设备 deviceDidGoOffline 拔下了设备, >方法未调用。设备脱机后如何发布通知?
} this runs fine at the start of application and the devices are added to UI normally because I add a listener to it and start the scan when startScan method that typically runs for 5 seconds but if now i switch the source from TV or unplug the device from TV device deviceDidGoOffline method is not called. How can I have a notification posted once the device have gone offline?
推荐答案
SDK中当前存在一个错误会影响此特征。将在下一个版本中解决。
There is currently a bug in the SDK which affects this feature. It will be addressed in the next release.
这篇关于用户切换电视信号源时在应用上管理GCKDevices的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!