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 Sun 23 May - 17:02

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 Mon 24 May - 9:36; 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 Sun 23 May - 20:21

hello

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

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

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Resizing youtube videos?

Post by screamingtomatoe Sun 23 May - 20:35

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 Sun 23 May - 21:22


Copy insertion link :

Spoiler:

here you can modify height and width.

Your video is OK:
Resizing youtube videos? Video10


Jucarese
Jucarese
Hyperactive

Male Posts : 2553
Reputation : 120
Language : spanish
Location : SSF Admin

http://asistencia.foroactivo.com/u23082

Back to top Go down

Solved Re: Resizing youtube videos?

Post by skouliki Sun 23 May - 21:34

you can add this to your css

Code:

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

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

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Resizing youtube videos?

Post by SLGray Sun 23 May - 21:51

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 : 51554
Reputation : 3524
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 Mon 24 May - 1:23

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 Mon 24 May - 9:36

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 Mon 24 May - 10:57

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 : 15391
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