To embed any video we simply paste the video link when creating a topic.
However, why is it that when I embed a YouTube video, (see below) it stretches from end to end? Whereas when I embed a Video from Vimeo, it does not stretch from end to end.
Any way this can be fixed?
I have seen no difference even if I allocate a video size in VIMEO embed code. The video still displays the same as pasting the video link.
In both cases all I do is paste the video URL.
YouTube
Vimeo
Looks like I cannot embed a video here. So here are some screenshots from my community. The Vimeo video width is shorter than the YouTube Video width. Is there a way to make the Vimeo video also expand to the maximum allowed width?
Hi Falco,
I am new to discourse and have no idea what does PR mean (as mentioned by you, âI have PR for full width vimeo oneboxesâ)
Although you have shown me a test that now works, what do I have to do to get it to work? Because Vimeo videos in my community still do not expand to full fidth.
I am still trying to make sense of what you just did in this post above. Iâd really appreciate it if you can tell me what I need to do to fix this in my community. Thanks
PR means âpull requestâ, and it refers to GitHub. Essentially it means that Falco made a change to the Discourse code, and is looking to get that change reviewed before merging the change into Discourse.
This specific Discourse site, meta.discourse.org, is updated automatically with every change one of our engineers make. Your site is not deployed automatically like that - we deploy customers on a regular, but less frequent, basis. Iâve gone ahead and initiated an deploy (update) for your site. The deploy should complete in ~30 minutes.
Once the deploy is complete, youâll need to rebuild the post. To do that, click the âshow moreâ button below the post, then click the admin wrench. Lastly, click ârebuild HTMLâ
They experience an oddity in embed size. Even after this commit, the size of private videos remains small. Iâm hoping there is a way to make those full width too?
Why not apply this same logic to any OneBoxâed source which explicitly specifies its height and width and ultimately gets embedded via an iframe?
Thoughts and Approach
In theory, if we already have the explicit height/width and thatâs getting specified on the iframe, the same general approach with setting the aspect ratio could be used to make things scalable generically.
For example, Iâve been embedding more and more video demos in our community, so I switched to Bunny.net, who is known for their CDN, and their Bunny Stream service for uploading and embedding videos.
After adding video.bunnycdn.com and iframe.mediadelivery.net to my allowed iframes setting, I can easily paste in a URL from Bunny Stream and it gets OneBoxâed using one of the generic fallbacks⌠but the aspect ratio gets really funky when viewed on a mobile device.
As a quick workaround, I wrote a simple Theme Component which uses the Plugin API and decorateCookedElement to update the iframe with the aspect ratio information.