如何在 CAF Sender 上确定正在播放广告插播?
How to determine on CAF Sender that ad break is playing?
我正在使用实现广告插播的 CAF 接收器。在接收方广告正常播放。
根据文档https://developers.google.com/cast/docs/caf_receiver/ad_breaks
"While a break is playing, CAF Receiver SDK broadcasts MediaStatus with breakStatus to all connected senders. Senders can use this information to update UIs and suppress any seek operations."
在广告中断播放之前,发送方 (chrome) 的 breakStatus 未定义。当休息开始播放时,会填充 breakStatus。然后在 break 完成后 breakStatus 不会返回到 undefined。要查看这些结果,我手动 运行: window.cast.framework.CastContext.getInstance().getCurrentSession().getMediaSession()
.
我的计划是使用 breakStatus 的存在来指示正在播放广告插播。我无法找到有关此中断状态广播的更多信息。我觉得应该有一些事件侦听器,但我没能找到它 https://developers.google.com/cast/docs/reference/chrome/cast.framework#.RemotePlayerEventType。
是否有替代解决方案来确定当前是否正在播放广告插播?
3 月 25 日的 CAF 接收器更新似乎解决了这个问题 https://developers.google.com/cast/docs/release-notes
通过将 breakStatus 设置为空对象,它会在发送方更新。
我正在使用实现广告插播的 CAF 接收器。在接收方广告正常播放。
根据文档https://developers.google.com/cast/docs/caf_receiver/ad_breaks "While a break is playing, CAF Receiver SDK broadcasts MediaStatus with breakStatus to all connected senders. Senders can use this information to update UIs and suppress any seek operations."
在广告中断播放之前,发送方 (chrome) 的 breakStatus 未定义。当休息开始播放时,会填充 breakStatus。然后在 break 完成后 breakStatus 不会返回到 undefined。要查看这些结果,我手动 运行: window.cast.framework.CastContext.getInstance().getCurrentSession().getMediaSession()
.
我的计划是使用 breakStatus 的存在来指示正在播放广告插播。我无法找到有关此中断状态广播的更多信息。我觉得应该有一些事件侦听器,但我没能找到它 https://developers.google.com/cast/docs/reference/chrome/cast.framework#.RemotePlayerEventType。
是否有替代解决方案来确定当前是否正在播放广告插播?
3 月 25 日的 CAF 接收器更新似乎解决了这个问题 https://developers.google.com/cast/docs/release-notes
通过将 breakStatus 设置为空对象,它会在发送方更新。