定位带有时间变化链接的嵌入式YouTube视频

时间:2014-12-09 20:26:59

标签: javascript jquery html iframe youtube

我正在撰写一篇包含You Tube嵌入式视频的网络文章。我想在文章中提供改变视频播放内容的链接。例如,如果我有一个5分钟的视频讨论了几个主题,链接将允许读者快进到视频中的相关部分。我尝试通过将iframe与特定时间码的链接定位来实现此目的,但它们没有任何效果。这甚至可以用简单的HTML完成吗?如果是这样,我做错了什么?如果我需要使用另一种技术,那么最简单的方法是什么?

<!doctype=html>
    <html>
<head>
    <title>
        YouTube Test
    </title>
</head>
<!-- This document demonstrates how an embedded YouTube video can be targeted by time specified     links.
 This feature will allow articles to direct viewers to the specific step they need help with -->
<body>
YouTube Time Targeting Test
<iframe name="iframe_a" width="560" height="315" src="http://www.youtube.com/embed/b8bLtg9J1Oc"     frameborder="0" allowfullscreen></iframe>
    <!-- Target to 00:18 -->
<p><a href="http://youtu.be/b8bLtg9J1Oc?t=30s" target="iframe_a" >Time 1</a></p>
    <!-- Target to 00:23 -->
<p><a href="www.youtube.com/embed/b8bLtg9J1Oc?t=23s" target="iframe_a" >Time 2</a></p>
    <!-- Target to 00:43 -->
<p><a href="www.youtube.com/embed/b8bLtg9J1Oc?t=43s" target="iframe_a" >Time 3</a></p>


</body>
</html> 

0 个答案:

没有答案
相关问题