backdrop-contrib / video_embed_field

Video Embed field creates a simple field type called Video Embed that allows you to embed videos from YouTube and Vimeo or show their thumbnail previews simply by entering the video's url.
GNU General Public License v2.0
1 stars 5 forks source link

Vimeo embedding inconsistent #12

Closed laryn closed 6 months ago

laryn commented 3 years ago

I'm having a strange result where embedding Vimeo seems to work fine on one site but not another. The videos have some domain-level privacy controls set on Vimeo, though I'm not sure that's the issue here. Strangely, I did find that changing the embed code to force SSL seems to solve it. Does that seem reasonable?

laryn commented 2 years ago

Closing for now, I don't even remember which site this was on.

olafgrabienski commented 2 years ago

changing the embed code to force SSL seems to solve it. Does that seem reasonable?

Interesting! @laryn Was the site in question maybe using the GDPR Cookies module? I'm asking because on one of my sites where I use GDPR Cookies and its Vimeo vanisher, in a certain situation the video doesn't work, and there appears an "embed code not valid" message. See my (closed) issue report in the GDPR Cookies queue.

Forcing the embed code to use SSL, like you did in https://github.com/backdrop-contrib/video_embed_field/pull/13, fixes the issue for me.

olafgrabienski commented 5 months ago

@laryn I saw that you merged #34 but even if the PR title is promising, it didn't fix the Vimeo issue.

In line 574 the https protocol is missing from the player URL:

    '#markup' => '<iframe' (...) src="//player.vimeo.com/video/' . $id .

Adding https: like below works for me.

    '#markup' => '<iframe' (...) src="https://player.vimeo.com/video/' . $id .