【发布时间】:2021-09-17 01:05:55
【问题描述】:
我正在返回烧瓶中的字典列表:return render_template( "index.html" , data = data )
然后在 index.html 中循环遍历这个字典列表
{%for record in data%}
<p>{{record.video_id}} {{record.start_time}}</p>
{%endfor%}
我在 html 中使用 iframe 来预览视频,并在特定的 start_time 像这样
{%for record in data%}
<iframe width="420" height="315"
src="https://www.youtube.com/embed/{{record.video_id}}?start={{record.start_time}}">
</iframe>
{%endfor%}
它显示视频正确,但开始时间不是那么如何在我给出的 start_time 变量的时间启用开始视频?
【问题讨论】:
-
It shows the videos right but the start time is not= edit 您对样本的问题。
标签: html flask iframe youtube jinja2