Disable auto play on Vimeo video set at a specific time for playback

I will try to consider as much as possible my question, the first round. My question is this:

I am trying to embed a Vimeo video in Blogger that plays a specific timestamp, i.e. 4 minutes 32 seconds, instead of starting the video without auto-playing it. The video will fit perfectly in the timestamp, but it will start automatically, and I can’t figure out how to disable this feature. Code for video below:

<div style="text-align: center;">
<br />
<iframe allowfullscreen="" frameborder="0" height="375" mozallowfullscreen=""src="https://player.vimeo.com/video/125840111#t=3665s" webkitallowfullscreen=""width="500"></iframe>

I tried various methods "autoplay = 0", etc., but I think that I am not getting the correct code.

Any help would be greatly appreciated.

+4
source share
1 answer

Have you tried like this?

<iframe allowfullscreen="" frameborder="0" height="375" mozallowfullscreen=""src="https://player.vimeo.com/video/125840111#t=3665s?autoplay=0" webkitallowfullscreen=""width="500"></iframe>

if it doesn’t work, try to find it using the check item, it can be changed to ?autopplay=1after the page loads, so try this method, which it worked for me

first your html, insert a screenshot of your vimeo video in the image tag and define the onclick function for this and attach the iframe to the click function, it should work here is the code

<div id="parent-div" >                                                                   
  <img id="vimeo-video" src="images/homeVideo.png" onclick="return imgClick();" />
  </div>   

and your javascript function

function imgClick() {

                    jQuery('#image-for-video').hide();  //hide the image to display your video
                    var ifrm = document.createElement("iframe");
                    ifrm.setAttribute("src", "https://player.vimeo.com/video/1992892829?autoplay=0");
                    ifrm.style.width = "496px";
                    ifrm.style.height = "277px";
                    // add rest of your values
                    ifrm.frameborder = 0;
                    document.getElementById("parent-div").appendChild(ifrm);
                    return false;
                }
+1
source

Source: https://habr.com/ru/post/1584543/


All Articles