2017-04-04 83 views
0

我目前堅持在我設計的網站的問題。動態加載視頻在網站中的jquery滑塊

<div class="slider-pro" id="my-slider"> 
       <iframe width="1920" height="1280" src="youtubevideoURL?rel=0&fs=1&showinfo=0&autohide=1&vq=hd1080&autoplay=1&loop=1&playlist=playlistId" frameborder="0" allowfullscreen></iframe> 

但有了這個正在發生的事情是 - 視頻總是得到下載到用戶的瀏覽器即使當滑動不點擊和顯示。

我在滑塊中有6個幻燈片,其中3個有這樣的視頻鏈接。我想按需加載視頻(點播活動是當前活動的幻燈片)。

我在網站中使用jquery.sliderPro插件。

任何人都可以請提供一些見解,如何實現這一點?

回答

1

只需從src中刪除自動播放參數即可。 這就是你的代碼應該看起來像什麼 -

<iframe width="1920" height="1280" src="youtubevideoURL?rel=0&fs=1&showinfo=0&autohide=1&vq=hd1080&loop=1&playlist=playlistId" frameborder="0" allowfullscreen></iframe>