【问题标题】:django-embed-video - how to use Vimeo optionsdjango-embed-video - 如何使用 Vimeo 选项
【发布时间】:2013-08-19 09:02:40
【问题描述】:

我想将 Vimeo 视频嵌入到我的网站中,并且我很想使用 Vimeo 提供的一些选项,例如颜色、自动播放等。

django-embed-video 有机会吗?

【问题讨论】:

    标签: django vimeo embedding video-embedding


    【解决方案1】:

    是的,这是可能的。但是您必须构建自己的 HTML。只需使用您选择的选项从 Vimeo 页面复制 HTML,然后将视频 URL 替换为 {{ my_video.url }}。所以它看起来像这样:

    {% video item.video as my_video %}
      <iframe 
        src="{{ my_video.url }}?byline=0&amp;portrait=0&amp;color=ff0179&amp;autoplay=1" 
        width="500" height="281" frameborder="0" 
        webkitAllowFullScreen mozallowfullscreen allowFullScreen>
      </iframe>
    {% endvideo %}
    

    【讨论】:

      猜你喜欢
      • 2021-03-05
      • 1970-01-01
      • 2018-11-12
      • 2015-03-01
      • 1970-01-01
      • 2022-01-13
      • 2012-03-01
      • 2021-08-02
      • 2012-06-27
      相关资源
      最近更新 更多