-
AuthorPosts
-
April 14, 2018 at 6:06 pm #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, 6 months ago by Guenni007.
April 14, 2018 at 10:31 pm #942062April 16, 2018 at 9:10 pm #942758i 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 wantApril 17, 2018 at 7:57 am #942992May 4, 2018 at 11:37 am #951554and 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');
May 4, 2018 at 10:28 pm #951937Hi,
Thank you once again ;-)
Best regards,
BasilisMay 4, 2018 at 11:00 pm #951963Is 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
RobMay 5, 2018 at 7:45 am #952045that : “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 topicMay 5, 2018 at 5:03 pm #952139Ha 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,
RobMay 5, 2018 at 10:43 pm #952178Well 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 ! ;)
May 8, 2018 at 4:19 am #953038Beautiful! 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:
May 9, 2018 at 2:43 pm #953954Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.