Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #942002

    this to functions.php of your child-theme:

    for new enfold it will be nice to have the same surrounding containers:

    function youtube ($id){
    return 
    '<div class="avia-video avia-video-16-9" itemprop="video" itemtype="https://schema.org/VideoObject">
    <div class="avia-iframe-wrap">
    <iframe title="YouTube video player" src="https://www.youtube-nocookie.com/embed/'.$id[0].'?enablejsapi=1&ecver=2&cc_load_policy=1&playsinline=1&rel=0&showinfo=0&color=white&iv_load_policy=3" frameborder="0" allowfullscreen>
    </iframe>
    </div>
    </div>';
    }
    add_shortcode('youtube', 'youtube');

    from that on you can embed your youtube videos as

    [youtube LDZX4ooRsWs]
    

    the last is the youtube video id

    to show how nice to have a shortcode : https://webers-testseite.de/weber/youtube-testings/

    • This topic was modified 6 years, 7 months ago by Guenni007.
    #942062

    Hey Guenter,
    Thank you, this looks very good.

    Best regards,
    Mike

    #942758

    i do alway add the same thing as options behind the embed code – and that is very simple –
    and we can insert a shortcode nearly whereever we want

    #942992

    Hi Günter,

    Thanks a lot for sharing, very nice solution!

    Best regards,
    Rikard

    #951554

    and in addition: for all 4:3 videos : see https://webers-testseite.de/youtube-shortcode-for-enfold/
    ( by the way we don’t need the width height – even for 16:9 too)

    function youtube_4zu3 ($id){
    return 
    '<div class="avia-video avia-video-4-3" itemprop="video" itemtype="https://schema.org/VideoObject">
    <div class="avia-iframe-wrap">
    <iframe title="YouTube video player" src="https://www.youtube-nocookie.com/embed/'.$id[0].'?enablejsapi=1&ecver=2&showinfo=0&loop=1&color=white&rel=0" frameborder="0" allowfullscreen>
    </iframe>
    </div>
    </div>';
    }
    add_shortcode('youtube43', 'youtube_4zu3');
    #951937

    Hi,

    Thank you once again ;-)

    Best regards,
    Basilis

    #951963

    Is the top full-width blurred photo a video? It does not play on Chrome…?

    Agreed on self-hosted videos, and I have moved away from them. Part of the issue I was running into with Youtube hosted was that sometimes even on high-speed connections, Youtube would start showing video before hi-res had loaded, so it looked pixelated for first 10 seconds, then clears up. Self-hosted did not have that problem. However I’m using Smart Slider now for more of the video hosting, and compressing the mobile videos to 1-5 MB using Handbrake.

    My issue with 4.3.1 however is that the old pages on my site are no longer working with self-hosted video, and all the patching causes other issues (Youtube stops working when self-hosted starts working).

    Keep sharing solutions, it is appreciated!!!!

    Best
    Rob

    #952045

    that : “Is the top full-width blurred photo a video? It does not play on Chrome…?” was a joke – isn’t it.
    No it was no video – just a casual introduction to a dry topic

    #952139

    Ha ha I am becoming paranoid since so many video elements keep breaking! :)

    Bottom line, are you seeing stable autoplay video performance from 4.3.1? I have not been able to achieve that.

    Thanks,
    Rob

    #952178

    Well Rob – look now to the site ;)
    that a chrome does not start the autoplay is due to their new policy : https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
    https://webers-testseite.de/youtube-shortcode-for-enfold/

    and please have a look what happens if you directly start a video in content withour stopping the video on top ! ;)

    #953038

    Beautiful! The Matterhorn! I went there as a child and marveled at its beauty.

    So my site with 4.2.3 autpolay is still working on Chrome but with 4.3. it stops:
    http://www.thomashenthorne.com/78-southern-heights-blvd/

    I do think we will need the feature of autoplay muted video, click for sound to comply with new Chrome policies.

    I have done this with Smart Slider here… works on mobile as well, even over 4G / LTE:

    http://www.thomashenthorne.com/190-gilmartin-drive-tiburon/

    #953954

    Hi,

    This might help with the self hosted video issue. https://kriesi.at/support/topic/selfhosted-video-and-loop/#post-952615

    This is a nice documentation of the video audio control modification for the color section. https://webers-testseite.de/mute-unmute/

    Best regards,
    Ismael

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.