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

Breaks Vimeo video URL in iframe #2498

@Hrvoje

Description

@Hrvoje

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>

Activity

Hrvoje

Hrvoje commented on Jul 28, 2020

@Hrvoje
Author

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

nate-thomas

nate-thomas commented on Sep 3, 2020

@nate-thomas

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

Hrvoje

Hrvoje commented on Sep 3, 2020

@Hrvoje
Author

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

shadtek

shadtek commented on Feb 26, 2021

@shadtek

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @Hrvoje@shadtek@nate-thomas

      Issue actions

        Breaks Vimeo video URL in iframe · Issue #2498 · fancyapps/fancybox