Youtube options
-
Awesome plugin! We want to use the Youtube Slideshow for our new website, but there is a thing we can’t figure out. The plugin allows only normal sharing url’s, like:
But Youtube provides a ton of options you can set in the url to control what is visible and what’s not. For instance, when we use Youtube on other websites we use url’s like:
This way we have minimal branding and no youtube referrals after the video ends. Is there a way to implement this in Elementor Plus?
Cheers,
Hans
-
Hi there,
Thank you for your feedback!
You can not use videos like this yet, but this is a nice recommendation.
You can try a more global solution though, but It will apply for all videos in your Site!Open your themes functions.php and add this
add_filter('oembed_result', 'modify_youtube_embed_url'); function modify_youtube_embed_url($html) { return str_replace("?feature=oembed", "?feature=oembed&autoplay=1&showinfo=0&controls=0&loop=1&rel=0", $html); }inside adding any feature you might need or not.
Remember this will apply in all Videos, so you might need to restrict it in a certain page like this
function modify_youtube_embed_url($html) { if(is_page(XXX)){ return str_replace("?feature=oembed", "?feature=oembed&autoplay=1&showinfo=0&controls=0&loop=1&rel=0", $html); }else{ return $html; } return $html; } add_filter('oembed_result', 'modify_youtube_embed_url');replacing XXX with the page ID you have the Elementor Plus Video Gallery module.
Have a look here https://www.cssigniter.com/kb/how-to-find-the-post-id/ on finding your post/page ID.Let me know if this helps.
Thanks for the workaround Mark!
I’d like to ask you, if you like the theme and could take a minute to review it here it would help us a lot!
The topic ‘Youtube options’ is closed to new replies.