YouTube urls with `/embed/` in the url fail to embed
See original GitHub issueIssue Summary
Using an Embed block in a streamfield, we are able to embed videos from youtube.com like this https://youtu.be/2MW6CrxScLk
or like this https://www.youtube.com/watch?v=2MW6CrxScLk
but not like this https://youtube.com/embed/2MW6CrxScLk
Steps to Reproduce
Grab a youtube url by clicking on a link that says “Embed”.
Technical details
- Python version: 3.4
- Django version: 1.11.
- Wagtail version: 1.13.1
- Browser version: Chrome 62 (but it’s a backend thing)
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Getting Video unavailable error on an embedded URL
Normal youtube link works, but embed link shows "Video Unavailable".
Read more >Wagtail video embed fails for some YouTube URLs but not ...
A small portion of YouTube video URLs fail when attempting to embed, despite appearing to allow embedding. If I call get_embed directly, I...
Read more >Youtube embed not working; instead get link View On The ...
I have been embedding Youtube Live stream video links in WP for a couple of years. And now this morning I am getting...
Read more >The 5 most common errors when embedding videos - Mynd
If you insert your link without the "https://" part, you may receive the error message", The file or directory could not be found.”...
Read more >Why is it when I enter a url for a Youtube Video to add to the ...
However when I add the video link I receive the error above. ... only accepts YouTube links, you can definitely still embed links...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have a working version (needs tests/docs before I put in a PR) of the templates idea.
See the revised oembed code here: https://github.com/lb-/wagtail/blob/4127_embed_youtube_url/wagtail/embeds/finders/oembed.py
A working template that here: https://github.com/lb-/wagtail/blob/e7b8315f80a68b7b07ff83dce43ee20fe5b48f52/wagtail/embeds/oembed_providers.py#L29-L31
Would love some feedback if it is worth adding this feature, happy to add tests / document this correctly.
Hello y’all I was looking for answer for days but I found it here: https://docs.wagtail.org/en/stable/topics/writing_templates.html#responsive-embeds
for some reason it did not show up on google 🤔
Short of it is:
WAGTAILEMBEDS_RESPONSIVE_HTML = True
and BOOM responsive embeddeds