问题描述
需要:我想获得 onComplete 事件(如这里的答案:How to detect the end of a BrightCove Video?)但无法将其连接到 react 版本 - 答案中的文档链接也返回 404
MVCE:
- 在 https://player.support.brightcove.com/coding-topics/react-player-loader.html 上使用 codepen
- 无法触发
onComplete
,例如成功案例正在触发 (onSuccess: function(success)
)
解决方法
这是我的工作原理;
- 建议在 stackoverflow 上不再有
PROXY ="176.9.119.170:3128" print(PROXY) chrome_options = webdriver.ChromeOptions() chrome_options.add_argument('--proxy-server=%s' % PROXY) chrome = webdriver.Chrome(options=chrome_options) chrome.get("http://whatismyipaddress.com") time.sleep(3)
(甚至onComplete
或onEnded
)事件,例如 this answer - 我们必须在
onFinsihed
函数内工作 - 这些链接有帮助:
- https://player.support.brightcove.com/publish/brightcove-player-loader.html#Available_parameters
- 完整的事件列表:https://docs.brightcove.com/brightcove-player/1.x/Player.html
相关JS:
onSuccess