jquery
  • html5
  • video
  • slider
  • vimeo
  • 2013-08-25 157 views 8 likes 
    8

    我想爲Vimeo視頻添加滑塊。我檢查了this slider,但它使用了HTML5視頻標籤。當我使用與Vimeo視頻網址相同的代碼時,它不起作用。這裏是我的代碼:Vimeo視頻不支持HTML5標記

    <video src="http://player.vimeo.com/video/68866759"></video> 
    

    下面是完整的代碼:

    <html> 
    <body> 
    <script type='text/javascript' src='http://amazingslider.com/wp-includes/js/jquery/jquery.js?ver=1.7.2'></script> 
    <script type='text/javascript' src='http://amazingslider.com/wp-content/plugins/amazingslider-plugin/sharedengine/amazingslider.js?ver=1.6'></script> 
    <link rel="stylesheet" type="text/css" media="all" href="http://amazingslider.com/wp-content/themes/twentyeleven/style.css" /> 
    <div class="demo-slider"> 
        <div style="display:block;position:relative;margin:15px auto 30px;" id="amazingslider-11"> 
         <ul style="display:none;" class="amazingslider-slides"> 
          <li><img alt="Big Buck Bunny Copyright Blender Foundation" src="http://amazingslider.com/wp-content/uploads/amazingslider/11/images/big_buck_bunny_480_270.jpg"> 
           <video src="http://player.vimeo.com/video/68866759" preload="none"></video> 
          </li> 
          <li><img alt="Elephants Dream Copyright Blender Foundation" src="http://amazingslider.com/wp-content/uploads/amazingslider/11/images/elephants_dream_480_270.jpg"> 
           <video src="http://www.youtube.com/embed/TLkA0RELQ1g" preload="none"></video> 
          </li> 
          <li><img alt="Sintel - Third Open Movie by Blender Foundation" src="http://amazingslider.com/wp-content/uploads/amazingslider/11/images/Sintel_480_270.jpg"> 
           <video src="http://www.youtube.com/embed/eRsGyueVLvQ" preload="none"></video> 
          </li> 
         </ul> 
         <ul style="display:none;" class="amazingslider-thumbnails"> 
          <li><img src="http://amazingslider.com/wp-content/uploads/amazingslider/11/images/thumbnails/big_buck_bunny_480_270.jpg"></li> 
          <li><img src="http://amazingslider.com/wp-content/uploads/amazingslider/11/images/thumbnails/elephants_dream_480_270.jpg"></li> 
          <li><img src="http://amazingslider.com/wp-content/uploads/amazingslider/11/images/thumbnails/Sintel_480_270.jpg"></li> 
         </ul> 
         <div style="display:none;" class="amazingslider-engine"><a href="http://www.amazingslider.com">jQuery Slider</a></div> 
        </div> 
        <script src="http://amazingslider.com/wp-content/uploads/amazingslider/11/sliderengine/initslider.js"></script> 
    </div> 
    </body> 
    </html> 
    
    +0

    Vimeo爲您提供了一個嵌入頁面。複製Vimeo提供的任何HTML代碼片段並粘貼到您的'

    回答

    0

    你需要使用我們的嵌入代碼爲它工作。 http://player.vimeo.com/video/68866759不是一個視頻文件,它是一個HTML頁面,因此將其放入視頻標籤中將不會執行任何操作。

    如果用這個代替視頻標籤它應該工作:

    <iframe src="//player.vimeo.com/video/68866759" width="960" height="540" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

    20

    轉到您的視頻設置視頻文件,在底部有一個名爲使用你自己的部分玩家,你會發現有直接的網址到你的視頻。例如:

    <video src="http://player.vimeo.com/external/85569724.sd.mp4?s=43df5df0d733011263687d20a47557e4"></video> 
    

    注:這需要一個PRO Vimeo的帳戶。

    +2

    如果您不是內容擁有者,只想在視頻htnl5標籤上播放Vimeo視頻,例如vimeo主頁(例如http://summitdublin.com/),是否有方法可以爲視頻找到這些直接網址? ? – Ajar

    +2

    我找不到「使用自己的播放器」,它是否仍然存在? – edonbajrami

    +4

    @edonbajrami它仍然存在於今天。然而,我們有一個職業Vimeo帳戶... – BenRacicot

    相關問題