Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1418318

    Hi

    I couldn’t find anything about this from the past few years.

    I want to use the video element because I can use a cover image but related videos show at the end, which I don’t want.

    Here is a page with the simple link on top and the video element below. The both have the exact same url with ?rel=0. The simple link have no related videos and the video element does.

    Several years ago the video element disabled related videos by default if I remember correctly.

    Thank you for any suggestions that would allow me to use the video element without related videos
    David

    #1418397

    Yes – thats only a matter of youtube (Google) settings. In the past, it was possible to prevent various things by adding an attachment to the video url. They have decided not to allow this any more.

    z.B.: https://www.youtube.com/embed/1YQ8iP0DiUk?autoplay=1

    So the Google people decided to patronise their users even more. i didn’t find anything on https://developers.google.com/youtube/iframe_api_reference.

    I really do wish that I was wrong about all this.

    #1418398

    Thank you for this, but please have a look at the link I sent:
    https://adoptionvoicesthebook.com/video-test/
    I was able to prevent the recommended videos by pasting the link into the page with ?rel=0 at the end.
    That is the first video on the page and it does NOT show related videos at the end.
    The enfold video element with the same url DOES show related videos at the end.
    I would like to use the enfold element because I can use a cover image.

    So it is indeed something that can be prevented with normal embeds but not with the enfold element

    Thanks again
    David

    #1418399

    OK – i did not know that it still works – but you had to go the way over embed then. Nice

    #1418401

    This is how the first video on the page is done:
    Screenshot of url

    Is there anything I can add to get the enfold video element to do the same thing?

    Thank you!

    #1418462

    Hi,

    Thank you for the update.

    This is possible but you may have to modify the enfold/config-templatebuilder/avia-shortcodes/video/video.php file directly. The query parameters for Youtube videos are located around line 651.

    $params[] = 'autoplay=' . $video_attributes['autoplay'];
    					$params[] = 'loop=' . $video_attributes['loop'];
    					$params[] = 'controls=' . $video_attributes['controls'];
    					$params[] = $youtube ? 'mute=' . $video_attributes['muted'] : 'muted=' . $video_attributes['muted'];
    

    You can append the rel parameter by adding this line.

    $params[] = 'rel=0';
    

    Best regards,
    Ismael

    #1418495

    but please if it is possible this should be default setting !!!
    And perhaps only a checkmark if you realy need that.

    But if i inspect the DOM before that change – f.e. on autoplay even there – no parameters were set at the url
    just that f.e. src="https://www.youtube.com/embed/G0k3kHtyoqc?feature=oembed"

    no autoplay=1 is set to the url etc. – with the changes above – no rel=0

    PS: on sliders there are those $video_data’s going to the output of the video url:

    #1418515

    That worked! Thank you Ismael.

    The only problem is that I can’t put that in the child theme.

    I second what Guenni007 said about making it default. Especially since I can’t put the solution in the child theme. I’m sure that it was default a few years ago. This really matters to so many of my clients – that the related videos don’t show at the end.

    Thanks again
    David

    #1418516

    put this to your child-theme functions.php:
    (see on docu: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#customization )

    function avia_include_shortcode_template($paths){
      $template_url = get_stylesheet_directory();
          array_unshift($paths, $template_url.'/shortcodes/');
      return $paths;
    }
    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);

    and copy that edited video.php to that folder : shortcodes

    #1419313

    Perfect! Thank you, Guenni007!
    That is great to know about and it worked!

    #1419326

    Hi,

    Great, I’m glad that @guenni007 could help you out :-)

    Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

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