ios - GCKDeviceManager 协议(protocol) - didDisconnectWithError : and didDisconnectFromApplicationWithError:? 之间有什么区别

标签 ios chromecast google-cast

<GCKDeviceManagerDelegate> Protocol我看到两种非常相似的方法:

/**
 * Called when the connection to the device has been terminated. It is safe to release the
 * GCKDeviceManager object from within this callback.
 *
 * @param deviceManager The device manager.
 * @param error The error that caused the disconnection; nil if there was no error (e.g. intentional
 * disconnection).
 */
- (void)deviceManager:(GCKDeviceManager *)deviceManager
    didDisconnectWithError:(NSError *)error;

/**
 * Called when disconnected from the current application.
 *
 * @param deviceManager The device manager.
 * @param error The error that caused the disconnect, or <code>nil</code> if this was a normal
 * disconnect.
 */
- (void)deviceManager:(GCKDeviceManager *)deviceManager
    didDisconnectFromApplicationWithError:(NSError *)error;

deviceManager:didDisconnectWithError:如果 Chromecast 接收器断开连接或失去与应用程序的连接,则调用 deviceManager:didDisconnectFromApplicationWithError:当应用程序尝试断开与 Chromecast 接收器的连接时调用?

调用每个委托(delegate)方法的用例是什么?

最佳答案

发送方应用程序可以连接到转换设备,连接成功后可以在转换设备上启动接收方应用程序。因此,“连接到设备”和“运行应用程序”是两个独立的操作,“停止接收器应用程序”和“断开”与转换设备的连接也是如此。因此,有这两种不同的方法。

关于ios - GCKDeviceManager 协议(protocol) - didDisconnectWithError : and didDisconnectFromApplicationWithError:? 之间有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35800293/

相关文章:

ios - 从 url 下载 pdf 文件

ios - 应用商店上的应用提交给出警告 "Missing 64-bit support"

iphone - CorePlot ScatterPlot 滚动性能 iPhone4

ios - 将 Google Cast SDK 添加到 64 位版本

javascript - 使用 javascript 动态插入图像

ios - 捕获单元格的索引值,但仅来自屏幕上的可见单元格

android - Exoplayer cast 实现在 2019 年 7 月运行但在本月(2019 年 10 月)不运行且不更改任何代码,有人知道发生了什么吗?

youtube - Chromecast 支持通过 youtube player API 播放的 youtube 视频

java - 演示中未显示转换按钮

css - Google Cast SDK 开发者控制台