Chromecast CCL IVideoCastOnFailed状态代码在哪里定义?

Chromecast CCL IVideoCastOnFailed状态代码在哪里定义?,chromecast,google-cast,Chromecast,Google Cast,我需要知道在实现IVideoCastConsumer时,在哪里定义了onFailed(int-resourceId,int-statusCode)状态代码 谢谢。资源ID指向故障可用的“默认”消息。以下是(当前)默认资源的列表(在CCL中查找res/values/strings.xml);可以在您自己的项目中覆盖它们: <!-- Failures --> <string name="failed_to_connect">Could not connect to the d

我需要知道在实现
IVideoCastConsumer
时,在哪里定义了
onFailed(int-resourceId,int-statusCode)
状态代码


谢谢。

资源ID指向故障可用的“默认”消息。以下是(当前)默认资源的列表(在CCL中查找
res/values/strings.xml
);可以在您自己的项目中覆盖它们:

<!-- Failures -->
<string name="failed_to_connect">Could not connect to the device</string>
<string name="failed_setting_volume">Failed to set the volume</string>
<string name="failed_no_connection">No connection to the cast device is present</string>
<string name="failed_no_connection_short">No connection</string>
<string name="failed_no_connection_trans">Connection to the cast device has been lost. Application is trying to re-establish the connection, if possible. Please wait for a few seconds and try again.</string>
<string name="failed_perform_action">Failed to perform the action</string>
<string name="failed_status_request">Failed to sync up with the cast device</string>
<string name="failed_load">Failed to load media on the cast device</string>
<string name="failed_seek">Failed to seek to the new position on the cast device</string>
<string name="failed_receiver_player_error">Receiver player has encountered a sever error</string>
<string name="failed_authorization_timeout">Authorization timed out</string>

无法连接到设备
无法设置卷
不存在与cast设备的连接
没有联系
与cast设备的连接已断开。如果可能,应用程序正在尝试重新建立连接。请等待几秒钟,然后重试。
未能执行该操作
无法与强制转换设备同步
无法在播送设备上加载媒体
未能在转换设备上搜索到新位置
接收器播放器遇到严重错误
授权超时

第二个参数,
statusCode
是指您正在执行的操作的状态代码;例如,如果您正在调用
RemoteMediaPlayer.load(..)
,则
ResultCallback
提供一个
MediaChannelResult
对象,该对象封装状态代码(可通过
getStatus().getStatusCode()
获得)。这些状态代码主要在中定义。请注意,有时没有状态代码。

对我来说,这似乎是正确的列表,但我得到的状态代码1不在该列表中的任何位置。谢谢您提供的信息。我将不得不再次运行我的代码,但我可以发誓,我有时会得到一个失败的状态代码1,这是没有列在该页上。如果你得到“1”,让我知道是什么操作抛出了该消息,以及资源指向了什么。resourceId=2131099723 statusCode=1I试图在没有allow origin标头的情况下强制转换m3u8文件,因此失败。是什么api调用导致的?该resourceId转换为什么(即,它的字符串表示形式是什么)?