Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 youtube 视频,我需要在它完成后触发一个事件。你知不知道怎么?
加载 API 或视频后,您将能够看到视频的状态,如下所示: “-1” - 视频已准备好播放 “1” - 视频正在播放(点击播放按钮) “2 " - 视频暂停 "0" - 视频结束
var status = player.getPlayerState();
API YouTube