-
Notifications
You must be signed in to change notification settings - Fork 338
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
Expand video embeds to fullwidth #1437
Expand video embeds to fullwidth #1437
Conversation
This should correctly size the embedded video iframe to the full available width, which looks better and is compatible with mobile devices. Also add the "allowfullscreen" modifier to the iframe so that the video can be expanded to the browser's fullscreen mode. Also add the post.embed_title as the iframe "title" attribute.
TODO: the text |
I haven't been able to test this locally as I haven't been able to get a post with an embed to work properly for some reason. |
Tested and can confirm it looks great: https://imgur.com/a/ho0nUIh The video can also be made fullscreen. |
allowFullScreen | ||
className="post-metadata-iframe" | ||
src={post.embed_video_url} | ||
title={"Embedded Video: " + post.embed_title} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add the "Embedded Video" string, there will have to be a translation made.. Alternatively, you could just make the title post.embed_title
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, for now I will remove the prefix, but it is probably worth adding in the future as screen readers might find it useful.
Use Bootstrap 5.0
.ratio
class to wrap embedded video iframe so that it is properly handled in a responsive way. Also addallowfullscreen
hint andtitle
attribute to embedded iframe.Fixes #926