For some reason, the Vimeo iframe is missing the fullscreen button. It works if I use the official embed code directly in the HTML, but not this way.
JS:
var iframe = document.createElement("iframe");
var videoid = document.querySelector(".active .video-id");
videoid.setAttribute("src", "allow='autoplay; fullscreen' webkitallowfullscreen mozallowfullscreen allowfullscreen");
iframe.setAttribute("src", "https://player.vimeo.com/video/" + videoid.id + "?autoplay=1&portrait=0&title=0 width='100' height='100' frameborder='0' allow='autoplay; fullscreen' webkitallowfullscreen mozallowfullscreen allowfullscreen");
videoid.appendChild(iframe);
CSS:
.video-id {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
z-index: -1;
pointer-events: none;
}
.video-id iframe,
.video-id object,
.video-id embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: auto;
}