【问题标题】:Custom receiver doesn't call onLoad after disconnect / reconnect断开/重新连接后自定义接收器不调用 onLoad
【发布时间】:2017-03-20 21:36:19
【问题描述】:

当我在没有关闭 Android 应用程序的接收器的情况下断开连接并重新连接时,投射接收器不再接收 onLoad 事件。 自定义消息总线仍然有效。

mRemoteMediaPlayer.requestStatus 超时设置为 15 秒,超时。

我可以看到演员接收者收到一条消息:

[cast.receiver.IpcChannel] Received message: {"data":"{\"requestId\":2,\"type\":\"LOAD\",\"media\":{\"contentId\":  ... }}

CastPlayer.prototype.load 永远不会被调用。

收到的 MediaManager 消息永远不会显示。

我不确定在哪里查找错误。

【问题讨论】:

  • 您是否发现 Google Cast 示例应用存在同样的问题? Chrome 远程调试器中是否有任何错误消息?如果您有可靠的方法来重现该问题,请使用示例流提交错误:issuetracker.google.com/…
  • 错误出现在我的接收器中,我会为此添加一个答案,并详细描述它。

标签: chromecast google-cast


【解决方案1】:

这个错误是投图后才出现的,因为我自己处理的。

self.resetMediaElement_()之后我错过了mimeType image/*:

this.mediaElement_.addEventListener('stalled', this.onBuffering_.bind(this), false);
this.mediaElement_.addEventListener('waiting', this.onBuffering_.bind(this), false);
this.onLoadOrig_(new cast.receiver.MediaManager.Event(cast.receiver.MediaManager.EventType.LOAD, (info.message), info.senderId));

【讨论】:

    猜你喜欢
    • 2014-08-12
    • 2012-08-07
    • 2019-02-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-28
    相关资源
    最近更新 更多