如何确定CAF发件人正在播放广告?

问题描述 投票:0回答:1

我正在使用实现广告插播的CAF接收器。在接收方,广告正常播放。

根据文档https://developers.google.com/cast/docs/caf_receiver/ad_breaks“当休息正在播放时,CAF Receiver SDK将带有breakStatus的MediaStatus广播到所有连接的发件人。发件人可以使用此信息更新UI并禁止任何搜索操作。”

在广告插播播放之前的发件人(chrome)上,breakStatus未定义。当休息开始播放时,将填充breakStatus。然后在中断完成后,breakStatus不会返回到undefined。要查看这些结果,我一直在手动运行:window.cast.framework.CastContext.getInstance().getCurrentSession().getMediaSession()

我的计划是使用breakStatus来表示广告中断正在播放。我无法找到有关此中断状态广播的更多信息。我觉得应该有一些事件监听器,但我无法找到它https://developers.google.com/cast/docs/reference/chrome/cast.framework#.RemotePlayerEventType

是否有其他解决方案来确定广告时段目前是否正在播放?

google-cast
1个回答
0
投票

3月25日CAF接收器更新https://developers.google.com/cast/docs/release-notes似乎解决了该问题

通过将breakStatus设置为空对象,它将在发送方进行更新。

© www.soinside.com 2019 - 2024. All rights reserved.