JWPlayer(8.7.3+商业版)提供了方法playAd
和pauseAd
。但它不提供停止广告和恢复流或 VoD 的功能。
https://developer.jwplayer.com/jw-player/docs/javascript-api-reference/#jwplayerplayadtag
2014/15 有一个已回答的问题,但它不再适用于 JWPlayer 8: Stop JWPlayer ad playback
对于上下文:
在直播期间,我们希望显示一些插播广告并让 JWPlayer 请求一个 VAST-URL。
VAST-URL 可能会在一个广告连播中返回多个广告。
现在我们收到一个事件,表明直播中发生了一些有趣的事情,我们想停止播放广告。
如果无法停止当前广告,我们至少希望不在广告连播中启动下一个广告。
我们不敢为了启用此功能而销毁和重新创建播放器。
有什么办法吗?
最佳答案
编辑:从版本 8.10.1 开始,似乎有 skipAd
方法。它跳过广告。 jwplayer().skipAd()
8.7.3 的答案:
没有用于停止广告的 API。
我们从 jwplayer 得到了关于这个的答案(特别是针对版本 8.7.3):
Your method of destroying a player therefore recreating a new one is probably the solution you would be opting for as of now.
Due to a potential ability to involve risks as well as fraud, we have limited the ability to stop ads in the past.
关于javascript - 是否有停止 JWPlayer (8.7.3) 广告和/或广告连播的功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57166489/