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.
所以我目前正在使用php从MySql数据库中随机选择一个YouTube视频到一个iframe中。
我正在尝试查看是否可以让视频在自定义时间暂停(时间很容易从数据库中获取),或者调出注释并暂停。
我查看了各种解决方案,但似乎没有一个是基于随机视频的不同时间。有任何想法吗?
好的,所以我只是&end=xx在 url 的末尾设置了一个端点,并使用 javascript 将其删除以让人们玩超出该点
&end=xx
var src=document.getElementById("video").getAttribute("src") var subsrc=src.substring(0, src.lastIndexOf("&"));
足够简单