The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Resizing youtube videos?

5 posters

Go down

Solved Resizing youtube videos?

Post by screamingtomatoe May 23rd 2021, 5:02 pm

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
screamingtomatoe
screamingtomatoe
New Member

Posts : 7
Reputation : 1
Language : polish, english

http://kerch.forumpolish.com

Back to top Go down

Solved Re: Resizing youtube videos?

Post by skouliki May 23rd 2021, 8:21 pm

hello

can you provide a topic url with a video please
skouliki
skouliki
Manager
Manager

Female Posts : 15399
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Resizing youtube videos?

Post by screamingtomatoe May 23rd 2021, 8:35 pm

screamingtomatoe
screamingtomatoe
New Member

Posts : 7
Reputation : 1
Language : polish, english

http://kerch.forumpolish.com

Back to top Go down

Solved Re: Resizing youtube videos?

Post by Jucarese May 23rd 2021, 9:22 pm


Copy insertion link :

Spoiler:

here you can modify height and width.

Your video is OK:
Resizing youtube videos? Video10


Jucarese
Jucarese
Hyperactive

Male Posts : 2558
Reputation : 121
Language : spanish
Location : SSF Admin

http://asistencia.foroactivo.com/u23082

Back to top Go down

Solved Re: Resizing youtube videos?

Post by skouliki May 23rd 2021, 9:34 pm

you can add this to your css

Code:

iframe {
    max-width: 90% !important;
}
skouliki
skouliki
Manager
Manager

Female Posts : 15399
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Resizing youtube videos?

Post by SLGray May 23rd 2021, 9:51 pm

Are you using the Youtube button in the editor?


Resizing youtube videos? Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51576
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Resizing youtube videos?

Post by brandon_g May 24th 2021, 1:23 am

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.


Resizing youtube videos? Brando10
Remember to mark your topic Resizing youtube videos? Solved15 when a solution is found.
General Rules | Tips & Tricks | FAQ | Forgot Founder Password?

Resizing youtube videos? Scre1476
Team Leader
Review Section Rules | Request A Review | Sticker Points
brandon_g
brandon_g
Manager
Manager

Male Posts : 10113
Reputation : 923
Language : English
Location : USA

https://www.broadcastingduo.com

Back to top Go down

Solved Re: Resizing youtube videos?

Post by screamingtomatoe May 24th 2021, 9:36 am

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
screamingtomatoe
screamingtomatoe
New Member

Posts : 7
Reputation : 1
Language : polish, english

http://kerch.forumpolish.com

Back to top Go down

Solved Re: Resizing youtube videos?

Post by skouliki May 24th 2021, 10:57 am

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

Problem solved & topic archived.
Please read our forum rules: ESF General Rules

you are welcome
skouliki
skouliki
Manager
Manager

Female Posts : 15399
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

TonnyKamper likes this post

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum