Tag:

当用户切换电视信号源时,在应用程序上pipe理GCKDevices

谷歌浏览器ios提供了以下的设备发现方法 – (void)deviceDidComeOnline:(GCKDevice *)device { // : manipulate UI [self.tableView reloadData]; } – (void)deviceDidGoOffline:(GCKDevice *)device { //: manipulate UI [self.tableView reloadData]; }这应用程序开始运行良好,设备通常添加到用户界面,因为我添加一个侦听器,并启动扫描startScan方法时,通常运行5秒,但如果现在我从电视切换源或拔下设备从电视设备deviceDidGoOffline方法不被调用。 一旦设备脱机,我怎么能发布通知?

ChromeCast后台video播放支持iOS

我有一个问题,当我的应用程序进入后台chromecast iOS api的GCKSocketclosures,我得到这个错误从api的types -[GCKCastSocket socketDidDisconnect:withError:] socketDidDisconnect:withError: "(null)" 然后如果我将应用程序放到前台,api将自动创build套接字并将播放状态设置为暂停状态。 如果我现在试图再次播放video,它正常播放。 我正在像这样在后台线程上开始播放媒体。 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^ { [[CastViewController instance] castMedia:self.media]; }); 即使应用程序转到后台,如何保持播放仍然存在? 这里是从api的日志logging 2014-02-25 17:19:01.388 CastVideos[28470:60b] -[GCKCastSocket disconnect] disconnect 2014-02-25 17:19:01.391 CastVideos[28470:60b] -[GCKCastSocket doTeardownWithError:] doTeardownWithError 2014-02-25 17:19:01.395 CastVideos[28470:60b] -[GCKCastSocket doTeardownWithError:] notifying delegate that socket is disconnected 2014-02-25 17:19:01.399 CastVideos[28470:60b] -[GCKHeartbeatChannel didDisconnect] disconnected – stopping heartbeat timer if necessary […]