[Resolved] YouTube videos showing correct size on mobile

Home Forums Support YouTube videos showing correct size on mobile

This topic contains 26 replies, has 4 voices, and was last updated by  Tom 6 months ago.

Viewing 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • #470032

    Leo Customer Support

    Make sure you click Save changes and activate.

    #470033

    Lyle

    You have to click the Save Changes and Activate! … not just Save! LOL 🙂

    The description is optional … there for your use only.

    http://snifflevalve.com
    Tutorials and tips for GeneratePress, WP Show Posts, WordPress and Elementor

    #470034

    Travis

    Unless.. my ISP is caching pages and I can’t seem to fly above it? Here is an example post where the videos at the top are all too big on my phone. https://www.travisharris.com/blog/dover-hall-wedding/ Is this is the for anyone else?

    Perhaps it is working, and I can’t “see it” yet?

    #470036

    Travis

    Yeah, I don’t see that button anywhere. Next to “Save changes” it says.. “save changes and deactivate”, then it says export and delete. Thous are the only options

    #470042

    Lyle

    View post on imgur.com

    http://snifflevalve.com
    Tutorials and tips for GeneratePress, WP Show Posts, WordPress and Elementor

    #470045

    Lyle

    I just had another look at the code you posted and it is not correct. The correct PHP is:

    function alx_embed_html( $html ) {
        return '<div class="video-container">' . $html . '</div>';
    }
     
    add_filter( 'embed_oembed_html', 'alx_embed_html', 10, 3 );
    add_filter( 'video_embed_html', 'alx_embed_html' );

    http://snifflevalve.com
    Tutorials and tips for GeneratePress, WP Show Posts, WordPress and Elementor

    #470054

    Travis

    Here is a screen shot of mine. It looks different. I only have the save button. Maybe it activates automatically?

    I will replace the code, and see what happens!

    #470056

    Travis

    I see that you cant zoom in on my pic LOL. But, mine says save and DE activate. vs. yours says activate. Weird.

    #470116

    Tom Lead Developer

    That just means it’s already activated.

    That snippet will only work with videos that are embedded via oembed I believe. If you create a new test post or page and paste the video URL into the Visual editor, does it work (after you save)?

    #470279

    Travis

    Tom! You are exactly correct! I made a new test page, and yes.. the video is displaying properly on the phone.

    So..

    Is there a way that I can make this all happen without having to edit each post (this puts me back at square one).

    What about that Java that I posted from my tech reply based on my last theme? Would that work (see above / previous post).

    If so.. how can I enter this into GP?

    #470369

    Travis

    Second thought… I am just going to manually re-embed the video links with the method listed above. It’s not too bad, and likely will be a faster result.

    Thank you all so much!

    #470375

    Tom Lead Developer

    That’s definitely what I suggest, but perhaps only re-saving the page will trigger the code? Not likely, but worth a shot.

Viewing 12 posts - 16 through 27 (of 27 total)

You must be logged in to reply to this topic.