是否可以在嵌入YouTube视频时添加自己的注释或在自定义时间暂停?


Is it possible to add your own annotations or pause at a custom time when embedding a YouTube video?

所以我目前使用php从MySql数据库随机选择一个YouTube视频到iframe。

我想看看我是否可以让视频暂停在一个自定义的时间(时间很容易从数据库中获得),或带来一个注释和暂停。

我看过各种解决方案,但似乎没有一个是基于随机视频的不同时间。什么好主意吗?

好的,所以我只是在url的末尾使用&end=xx设置了一个结束点,然后使用javascript将其删除,以便让人们在该点之外玩

var src=document.getElementById("video").getAttribute("src")
var subsrc=src.substring(0, src.lastIndexOf("&"));

很简单