GIVEN a Vimeo video whose ID is fewer than 8 digits
WHEN I attempt to initialize the Plyr player on the iframe embed of that video
THEN the Plyr player should successfully initialize.
GIVEN a Vimeo video whose ID is fewer than 8 digits
WHEN I attempt to initialize the Plyr player on the iframe embed of that video
THEN the initialization fails with a Setup failed: Invalid provider error.
<div class="plyr__video-embed">
<iframe src="https://player.vimeo.com/video/8733915" allowfullscreen="" allowtransparency="true"></iframe>
</div>
<div> containing the embed (e.g. new Plyr(document.querySelector('.plyr__video-embed'), { debug: true }))I'm pretty sure the issue is right here: https://github.com/sampotts/plyr/blob/master/src/js/utils.js#L726
Plyr assumes that all Vimeo video IDs are at least 8 digits, whereas I have an example where the ID is 7 digits.
Note that I was able to temporarily hack around this by left padding the ID in the URL with zeros, e.g. if I change the URL to https://player.vimeo.com/video/08733915 then Plyr initializes correctly and the video still works.
This is an easy fix - just need to tweak the regex. Will get it sorted today.
This should be resolved in v3.3.6 馃憤
Most helpful comment
This should be resolved in v3.3.6 馃憤