Resizing youtube videos? Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
5 posters

    Resizing youtube videos?

    screamingtomatoe
    screamingtomatoe
    New Member


    Posts : 7
    Reputation : 1
    Language : polish, english

    Solved Resizing youtube videos?

    Post by screamingtomatoe May 24th 2021, 3:02 am

    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, 7:36 pm; edited 1 time in total
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15292
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Resizing youtube videos?

    Post by skouliki May 24th 2021, 6:21 am

    hello

    can you provide a topic url with a video please

    screamingtomatoe
    screamingtomatoe
    New Member


    Posts : 7
    Reputation : 1
    Language : polish, english

    Solved Re: Resizing youtube videos?

    Post by screamingtomatoe May 24th 2021, 6:35 am

    jucarese
    jucarese
    Hyperactive


    Male Posts : 2534
    Reputation : 118
    Language : spanish
    Location : SSF Admin

    Solved Re: Resizing youtube videos?

    Post by jucarese May 24th 2021, 7:22 am


    Copy insertion link :

    Spoiler:

    here you can modify height and width.

    Your video is OK:
    Resizing youtube videos? Video10


    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15292
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Resizing youtube videos?

    Post by skouliki May 24th 2021, 7:34 am

    you can add this to your css

    Code:

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

    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51474
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Resizing youtube videos?

    Post by SLGray May 24th 2021, 7:51 am

    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.
    brandon_g
    brandon_g
    Manager
    Manager


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

    Solved Re: Resizing youtube videos?

    Post by brandon_g May 24th 2021, 11: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
    screamingtomatoe
    screamingtomatoe
    New Member


    Posts : 7
    Reputation : 1
    Language : polish, english

    Solved Re: Resizing youtube videos?

    Post by screamingtomatoe May 24th 2021, 7:36 pm

    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
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15292
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Resizing youtube videos?

    Post by skouliki May 24th 2021, 8:57 pm

    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

    TonnyKamper likes this post