Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embedly widgets media.html broken for Patreon creators using dailymotion #98

Open
morganga opened this issue Aug 2, 2023 · 1 comment

Comments

@morganga
Copy link

morganga commented Aug 2, 2023

There's a bug in the CDN resource https://cdn.embedly.com/widgets/media.html

The bug can be reproduced in your own embed demo on your own website:
https://embed.ly/docs/explore/oembed?url=https%3A%2F%2Fwww.dailymotion.com%2Fvideo%2Fx8mqxrj

Notice the html section contains an iframe, but to the right, there is no embedded video.
the console logs an error in media.html here:
ERROR: Cannot read properties of null (reading '1')
LINE in media.html: var b = this.re.exec(this.data.html)[1];

where this.re is the regex /www.dailymotion.com/embed/video/(.*)/ and this.data.html is https://geo.dailymotion.com/player.html?video=x8mqxrj?
as you can see this.data.html doesn't match the expected format in the regex, and it fails to extract the video id.

A simple fix to this is to also try the regex /dailymotion.com/player.html?video=([^?&]*)/ to extract the video id.

PLEASE can you implement this fix on the https://cdn.embedly.com/widgets/media.html resource, or point me in the right direction to fix this resource myself.

This bug is breaking dailymotion videos embedded in Patreon, and has been live for weeks!!! I'm a patron of multiple creators, and this is disrupting their regular posting.

Please fix this or allow me to fix this.

@adamtaylor13
Copy link

Seconding that we've discovered an issue related to this in our application as well! We're receiving a 403 on a request to https://cdn.embedly.com/widgets/media.html. Interestingly, if I'm signed into our company's embedly account, it works without any issue. However, if I try it in a context without any authentication it fails with a 403 AccessDenied error and literally no error message about what went wrong or how to fix it. Keep in mind we use this exact same route for tens of thousands of other embeds with no issues whatsoever. It's just a few specific videos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants