(HTML / CSS)从同一页面链接到嵌入式YouTube视频的特定时间

时间:2015-09-14 00:11:43

标签: html css video youtube timestamp

我有一个嵌入式YouTube视频,从0:00开始。接下来是一段带有视频示例的段落,每个段落都有一个时间戳。有没有办法将这些时间戳链接回视频,以便点击每个时间戳会将视频的起点转移到该特定点?

谢谢!

<div class="video">
  <iframe width="100%" height="360px"  src="https://www.youtube.com/embed/7A6K2BeCMz0?rel=0" frameborder="0" allowfullscreen></iframe>     
</div>

...

<p>I can warmly recommend watching the entire movie, but here’s a shortlist of the strongest moments: Sergey’s being flogged by Boris (41:25), the poisoning of Boris (44:53); Zinovij return and death (1:05:04); the scene with the shabby little man (1:11:06, and especially the orchestral interlude at 1:14:00); the song of the exiled to Siberia (1:22:49—“O, you, road ploughed by chains, / the road to Siberia, sown with bones, / this road has been watered with blood and sweat, / death groans arise from it…”); the purest, most lyrical moment of the opera—Katerina’s words to Sergey as they meet after a day’s march (1:29:12—“Seryozha, my dearest! At last! I’ve gone the whole day without seeing you, Seryozha! Even the pain in my legs has gone, and the tiredness, and the grief, now you are with me…”). And finally, her final monologue, terrible in its disconnectedness, after Sergey’s betrayal, as for the first time since the opera began she understands what she’d done, and we see the dark chasm yawning before her (1:38:10)</p>

2 个答案:

答案 0 :(得分:0)

将时间戳链接到Youtube网址加上一个开始参数(值是起点的秒数)

对于你的情况,链接41:25到https://www.youtube.com/embed/7A6K2BeCMz0?start=2485

答案 1 :(得分:0)

YouTube iFrame API包含the function player.seekTo(seconds:Number, allowSeekAhead:Boolean):Void。但它需要使用JavaScript实现iFrame。您可以找到说明here