Skip to content

Commit b7c38b7

Browse files
authored
Merge pull request #233 from BuildFire/fix-fullscreen-control-for-vimeo
Fix fullscreen control for vimeo
2 parents db45fab + abe2fe4 commit b7c38b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

widget/assets/js/vg-vimeo-buildfire-edited.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@
5858
((C = O),
5959
(C = u[1] ? u[1].split("/")[0] + "?h=" + u[2]+"&" : u[2] + "?"),
6060
m ? (A = m.element) : ((A = document.createElement("iframe")), e.element(c.mediaElement[0]).replaceWith(e.element(A))),
61-
(A.src = "https://player.vimeo.com/video/" + C + "player_id=vimeoplayer&title=0&byline=0&portrait=0&controls=1"),
6261
(A.style.width = "100%"),
6362
(A.style.height = "100%"),
6463
r.$eval(E) && (A.setAttribute("webkitallowfullscreen", ""), A.setAttribute("mozallowfullscreen", ""), A.setAttribute("allowfullscreen", ""), A.setAttribute("allow", "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture")),
6564
e.element(A.parentNode.parentNode).find("vg-overlay-play").css("height", "calc(100% - 50px)"),
65+
// move src after the appending attributes so the full screen icon will be appeared in the controls
66+
(A.src = "https://player.vimeo.com/video/" + C + "player_id=vimeoplayer&title=0&byline=0&portrait=0&controls=1"),
6667
(m = new Vimeo.Player(A)).ready().then(function () {
6768
!(function () {
6869
if (

0 commit comments

Comments
 (0)