statamic-video-embed icon indicating copy to clipboard operation
statamic-video-embed copied to clipboard

Vimeo links can have a second path segment which brakes the embed

Open SanBen opened this issue 3 years ago • 3 comments

Video links that are exposed in certain share dialogs of Vimeo can have two path segments, this breaks the embed. It seems this happens with private videos that are exposed via a "share" link.

Paste this: https://vimeo.com/680825358/fd410b0271 into the video url field of "statamic-video-embed"

Current behaviour: breaks because it takes the last path segment even though it should take the first

Expected behaviour: works because it takes the first path segment

SanBen avatar Feb 25 '22 20:02 SanBen

I do not I will be updating the V2 version of this plugin anymore as V3 has been out for a while, however, if you want to take a stab at it you can send a pull request.

The code would need to be updated to get the video ID in these two places:

https://github.com/jrc9designstudio/statamic-video-embed/blob/master/resources/assets/js/fieldtype.js#L73 https://github.com/jrc9designstudio/statamic-video-embed/blob/master/VideoEmbed.php#L37

jcohlmeyer avatar Mar 14 '22 09:03 jcohlmeyer

I do not I will be updating the V2 version of this plugin anymore as V3 has been out for a while, however, if you want to take a stab at it you can send a pull request.

The code would need to be updated to get the video ID in these two places:

https://github.com/jrc9designstudio/statamic-video-embed/blob/master/resources/assets/js/fieldtype.js#L73 https://github.com/jrc9designstudio/statamic-video-embed/blob/master/VideoEmbed.php#L37

Ok that makes sense, but where is V3? It is not listed in the addons section and I can't seem to find it on GitHub either.

SanBen avatar Mar 27 '22 10:03 SanBen

Yes, I have not yet ported it to V3. As there is now a native video field I was not sure there was much demand for this anymore. However I am planning on working on a new version for Statamic V3, I am just not sure about the timeline for this.

jcohlmeyer avatar Mar 29 '22 09:03 jcohlmeyer