Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Breaks Vimeo video URL in iframe #2498

Open
Hrvoje opened this issue Jul 28, 2020 · 4 comments · May be fixed by #2598
Open

Breaks Vimeo video URL in iframe #2498

Hrvoje opened this issue Jul 28, 2020 · 4 comments · May be fixed by #2598

Comments

@Hrvoje
Copy link

Hrvoje commented Jul 28, 2020

Describe the bug
Using the fancyBox version v3.5.7, there are thumbnails wrapped inside a a tag with URLs of vimeo videos. When the link is clicked some videos load without any issues bus some return either an error from vimeo stating that the video is not available or play a completely different video, not even from the same user.

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://montazstroj.skin29.net/projekti/u-osnivanju-u-likvidaciji/
  2. Scroll down to the section named "Video" and try clicking on the third video (should open the https://vimeo.com/431431349/624d13bcb3 instead opens the https://player.vimeo.com/video/624 video )

Expected behavior
The vimeo regex ^.+vimeo.com\/(.*\/)?([\d]+)(.*)? does not correctly extract the video ID, here are some of the vimeo video links on that page

Works:
https://vimeo.com/418545272/d020d2e04a
https://vimeo.com/295539609

Does not work:
https://vimeo.com/295539609
https://vimeo.com/431430936/0b374fcb9c
https://vimeo.com/436521985/3c81242f6d
https://vimeo.com/329169729/1a5f18ea88

Screenshots
vimeo-regex-bug-2020-07-28_15-02

Desktop (please complete the following information):

  • OS: any OS
  • All Browsers

Additional context
here is a code snipped from the page how the HTML and data attribiutes are set up:
<a href="https://vimeo.com/431431349/624d13bcb3" data-fancybox="video"><img src="http://montazstroj.skin29.net/wp-content/uploads/2020/05/912687767_295x166-12.jpg" alt=""></a>

@Hrvoje
Copy link
Author

Hrvoje commented Jul 28, 2020

Client requested to change the code - so no longer live on the site at the mentioned URL

@nate-thomas
Copy link

nate-thomas commented Sep 3, 2020

Using this regex ^.+vimeo.com\/(\/)?([\d]+)(.*)?fixed the problem for me, however I only tested 5-10 videos.

@Hrvoje
Copy link
Author

Hrvoje commented Sep 3, 2020

Thanks @nate-thomas this does fix the issue with the script for me to

@shadtek
Copy link

shadtek commented Feb 26, 2021

Using this regex ^.+vimeo.com\/(\/)?([\d]+)(.*)?fixed the problem for me, however I only tested 5-10 videos.

Thanks @nate-thomas your regex worked for me.

JacobTaylor-RCC added a commit to JacobTaylor-RCC/fancybox that referenced this issue Jun 2, 2021
Fix taken from fancyapps#2498 and credit also to fancyapps#2532 for reporting this issue. 

Credit to @nate-thomas for the fix fancyapps#2498 (comment)
propertyhive added a commit to propertyhive/WP-Property-Hive that referenced this issue Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants