【问题标题】:(HTML/CSS) Linking from the same page to specific times of embedded youtube video(HTML/CSS) 从同一页面链接到嵌入 youtube 视频的特定时间
【发布时间】:2015-09-14 00:11:43
【问题描述】:

我有一个嵌入的 youtube 视频,从 0:00: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>

【问题讨论】:

  • 任何人?...任何帮助将不胜感激。

标签: html css video youtube timestamp


【解决方案1】:

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

【讨论】:

  • 非常感谢。会试试的。
  • 没问题。祝你好运!
【解决方案2】:

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

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

【讨论】:

  • 谢谢 - 刚刚尝试过,但它会打开一个带有播放器的新窗口。我需要它做的是链接到视频已经嵌入到页面的前面(上面的第一个代码),但是将它的起点转移到新的时间点。跨度>
猜你喜欢
  • 1970-01-01
  • 2017-06-22
  • 1970-01-01
  • 1970-01-01
  • 2012-02-26
  • 2015-11-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多