Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #938651

    Will be possible to implement time code for a Youtube video when using it inside a full page slider directly?

    If I use the URL of the video like this: https://www.youtube.com/watch?v=MkYJaieL7OU&t=80s it gives error.

    Will be possible too select the portion of the video to play?

    Thanks in advance.

    #939037

    Hey dogdayfear,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #939334

    Of course:

    You can check for the site to load. First there is an image. After that is a full screen Youtube vide using time code. And it gives the error.

    UPDATE: I downloaded and installed las version of Enfold.

    Now it does not work:

    • This reply was modified 6 years, 8 months ago by dogdayfear.
    #939672

    Hi dogdayfear,

    Here is a thread for you to consider

    When you get the website running again, please post credentials in private.

    Best regards,
    Victoria

    #939859

    Ok, here is the site working again: http://www.casaelcortijo.es

    Created a Fullscreen Slideshow: first an imge. After that a full screen Youtube video: https://www.youtube.com/watch?v=WiO3CASTXxA&t=30 that gives the error..

    If you include in the URL of the video the time code like “&t=30” it does not work. Otherwise the video works without problem.

    • This reply was modified 6 years, 8 months ago by dogdayfear.
    #940727

    Hi,

    You can’t add more parameters to the video url because it’s going to break the converted embed url.

    https://YouTube/embed/MkYJaieL7OU&t=80s?iv_load_policy=3&showinfo=0&controls=1&color=white&autohide=1&version=3&loop=0&playlist=player_2_1343406832_471367595&wmode=opaque&rel=0&hd=1&videoid=MkYJaieL7OU%26t%3D80s&autoplay=0&html5=1&enablejsapi=1&origin=http%3A%2F%2Flocalhost&widgetid=1
    

    Try to change the parameters with a custom script.

    // https://kriesi.at/support/topic/video-not-to-autoplay/#post-917655

    Best regards,
    Ismael

    #940862

    Hi Ismael:

    I have tried adding this code to my functions.php as you suggested:

    add_action('wp_footer', 'ava_iframe_parameters');
    function ava_iframe_parameters(){
    ?>
    <script>
    (function($){
    	function avia_iframe_parameters_mod(container)
    	{
    		var iframe 	= $('iframe[src*="youtube.com"]', container),
    			youtubeEmbed = $('iframe[src*="youtube.com"] object, iframe[src*="youtube.com"] embed', container).attr('wmode','opaque');
    
    			iframe.each(function()
    			{
    				var current = $(this),
    					src 	= current.attr('src');
    
    				if(src)
    				{
    					if(src.indexOf('?') !== -1)
    					{
    						src += "&autoplay=0&showinfo=1&rel=0";
    					}
    
    					current.attr('src', src);
    				}
    			});
    	}
    
    	avia_iframe_parameters_mod('body');
    })(jQuery);
    </script>
    <?php
    }

    I have been playing with several parameters in that code (autoplay, time, rel …) and that does not work.

    It seems that this function does not overwrite the main function.

    • This reply was modified 6 years, 8 months ago by dogdayfear.
    #940880

    on embed shortcode it is:
    https://youtu.be/MkYJaieL7OU?t=1m20s

    and by the way the starting time option is with embed or watch:
    &start=80 bzw &end=28

    https://www.youtube.com/embed/MkYJaieL7OU?start=80

    https://www.youtube.com/embed/MkYJaieL7OU?start=80

    always think of that the first option after video id is a question mark !

    • This reply was modified 6 years, 8 months ago by Guenni007.
    #941472

    Hi,

    Thank you for the updates. Please provide the login details in the private field so that we can test the script.

    Best regards,
    Ismael

    #941482

    Here you have login credentials:

    Im using a child theme.

    You can check page Inicio. That is where the slider is.

    #942870

    Hi,

    Thank you for the info. We modified the script a bit. The start parameter is now appended to the url.

    <iframe height="1600" width="900" class="av_youtube_frame" id="player_398_2104478317_541183998" data-autoplay="0" data-videoid="WiO3CASTXxA" data-hd="1" data-rel="0" data-wmode="opaque" data-playlist="player_398_2104478317_541183998" data-loop="0" data-version="3" data-autohide="1" data-color="white" data-controls="0" data-showinfo="0" data-iv_load_policy="3" frameborder="0" allowfullscreen="1" allow="autoplay; encrypted-media" title="YouTube video player" src="https://www.youtube.com/embed/WiO3CASTXxA?iv_load_policy=3&showinfo=0&controls=0&color=white&autohide=1&version=3&loop=0&playlist=player_398_2104478317_541183998&wmode=opaque&rel=0&hd=1&videoid=WiO3CASTXxA&autoplay=0&html5=1&enablejsapi=1&origin=http%3A%2F%2Fwww.casaelcortijo.es&widgetid=1&autoplay=0&showinfo=1&rel=0&start=80"></iframe>
    

    Thanks to @Guenni007. :)

    Best regards,
    Ismael

    #944211

    Sorry for the delay.

    Now it seems to work perfect.

    Yo can mark this post as solved.

    Thank you so much.

    #944478

    Hi,

    Great, glad you got it working and thanks for the feedback. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Time code for Youtube videos when full screen slider’ is closed to new replies.