-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
tpl: Improve internal YouTube Shortcode #9414
Conversation
Added support for displaying Embedded YouTube player in 4:3 ratio, in addition to the default widescreen ratio. Also added support for all the latest parameters supported by embedded YouTube player including start/end time, looping, language, playlist, etc. Also added support for for diaplying a linked thumbnail to the YouTube video, instead of the embedded plyaer using the "linkthumbnail" parameter. Fixes 3694
Added support for displaying Embedded YouTube player in 4:3 ratio, in addition to the default widescreen ratio. Also added support for all the latest parameters supported by embedded YouTube player including start/end time, looping, language, playlist, etc. Also added support for for diaplying a linked thumbnail to the YouTube video, instead of the embedded plyaer using the "linkthumbnail" parameter. Fixes 3694
Thanks a lot for linkthumbnail |
Thanks for your work on this - I thought i'd try it and see whether it could also be used to play videos stored in Google Drive (in our case, for videos we share internally in the org). It works great if I change the iframe source from youtube to |
I'm very glad to find out people are already finding the changes helpful. I'm kinda new to contributing to Hugo. What you've asked for is an easy change. But I prefer to hear back from maintainers before working on more changes. Maybe you can add that to the original issue, or start a forum post? I'm not sure. (I'm afraid about maintainers not agree about adding this) |
It's an internal shortcode named |
@davidsneighbour You're right, it's not intended as a generic video shortcode - my point is that video streamed from google drive basically is youtube - It's essentially the same system; i can supply the same "controls=false" parameters, and the controls go away just as they do with youtube. No surprise given they're both owned by Google. Duplicating a shortcode just to change a URL is a waste of time and gives me yet something else to track for updates and improvements. |
@bep Could you take a look at this PR too? |
For what it is worth, you could probably make the title and aspect ratio settings automatic using YouTube's oembed endpoint, similar to how the Twitter shortcode does with For example:
Even if you ignore the HTML embed it suggests, we've got the title and thumbnail URL, and checking Some other thoughts:
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Added support for displaying Embedded YouTube player in 4:3 ratio, in addition to the default widescreen ratio. Also added support for all the latest parameters supported by embedded YouTube player including start/end time, looping, language, playlist, etc. Also added support for for diaplying a linked thumbnail to the YouTube video, instead of the embedded plyaer using the "linkthumbnail" parameter.
Fixes #3694