Resizing youtube videos?
5 posters
Page 1 of 1
Resizing youtube videos?
Technical Details
Forum version : #ModernBB
Position : Founder
Concerned browser(s) : Mozilla Firefox, Google Chrome, Internet Explorer, Opera
Screenshot of problem : https://images2.imgbox.com/b4/ea/1uTtNXtW_o.png
Who the problem concerns : All members
When the problem appeared : when we tried to embed youtube videos
Forum link : http://kerch.forumpolish.com
Description of problem
Hi all! When we tried to insert video from youtube on our forum, it looks weird, as if the preview was too big for post, as you can see on the screenshot provided. The same problem occured with images but when we changed automatic image resizing it dissappeared. We thought that maybe it would be the same with videos. The problem is we have no idea how to do it, since every solution provided on this forum doesn't seem to work for us for some reason. Is there anyone who could help us?Last edited by screamingtomatoe on May 24th 2021, 9:36 am; edited 1 time in total
Re: Resizing youtube videos?
Copy insertion link :
- Spoiler:
- <iframe width="537" height="315" src="https://www.youtube.com/embed/mVKPvspyyyQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
here you can modify height and width.
Your video is OK:
Re: Resizing youtube videos?
Are you using the Youtube button in the editor?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Resizing youtube videos?
You can't really do with the share link, by copying and paste the link or by using the Youtube button on the editor. The ONLY way to do this, would be to use the actual embed code you can get by clicking 'Share' on Youtube, then click embed. You will then see a code like this:
<iframe width="560" height="315" src="https://www.youtube.com/embed/videourlhere" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
You simply would paste the embed code, then change the width and height to whatever size you want by hand. Of course HTML would have to be enabled both on the forum and in a user's profile for it to actually work.
There might be a way to do the resize with css in the admin panel, but it is a bit more risky as it could stop working if Facebook makes any changes to the player and/or you have to embed something else other than a Youtube video using an iframe.
<iframe width="560" height="315" src="https://www.youtube.com/embed/videourlhere" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
You simply would paste the embed code, then change the width and height to whatever size you want by hand. Of course HTML would have to be enabled both on the forum and in a user's profile for it to actually work.
There might be a way to do the resize with css in the admin panel, but it is a bit more risky as it could stop working if Facebook makes any changes to the player and/or you have to embed something else other than a Youtube video using an iframe.
Remember to mark your topic when a solution is found.
General Rules | Tips & Tricks | FAQ | Forgot Founder Password?
Team Leader
Review Section Rules | Request A Review | Sticker Points
Re: Resizing youtube videos?
skouliki wrote:you can add this to your css
- Code:
iframe {
max-width: 90% !important;
}
it worked for now. we do not plan to use vdeos from other sources, so i hope that it's going to be okay for some time at least. thank you very much for your help everyone <3
Re: Resizing youtube videos?
if you dont change the width of your post text area (minimize) this will be ok
cause your width is now at 99% instead of 100% that's why we made with this code all iframes to have a max 90% width
you are welcome
cause your width is now at 99% instead of 100% that's why we made with this code all iframes to have a max 90% width
Problem solved & topic archived.
|
you are welcome
TonnyKamper likes this post
Similar topics
» Videos OTHER than YouTube
» IDK WHY I CAN'T UPLOAD YOUTUBE VIDEOS
» Embedding YouTube videos has changed?
» download music youtube videos
» Users unable to view youtube videos.
» IDK WHY I CAN'T UPLOAD YOUTUBE VIDEOS
» Embedding YouTube videos has changed?
» download music youtube videos
» Users unable to view youtube videos.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum