Home Forums WoodMart support forum Product Video – Can’t turn off Youtube loop

Product Video – Can’t turn off Youtube loop

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #603117

    gisli
    Participant

    Hey there,

    I’m trying to get the Product Video feature to work but I’m running into two issues:

    1. The get_video_content function always forces the &loop=1 attribute to all embedded Youtube links. How do I stop product videos from looping? Ideally I would only want the product video to play once.
    2. I’m having the same issue this user was having: https://xtemos.com/forums/topic/set-video-to-not-repeat/
      The video continues playing in the background after clicking the next arrow. Inserting the script provided in the other post seems to stop the video from playing entirely. How do I stop the video from playing in the background after pressing the next arrow?
    #603135

    Luke Nielsen
    Keymaster

    Hello,

    Send me access to the admin panel so I can investigate those issues. Also, send me the URL link where you have that youtube video.

    Thank you in advance.

    Kind Regards

    #603170

    gisli
    Participant

    Here’s the requested access and url.

    #603484

    Luke Nielsen
    Keymaster

    Hello,

    1. You can enable the Native player to avoid looping the video – https://take.ms/lZIDs. Let me know if that solution suits you.

    2. Add the code below into the “On document ready” area:

    setTimeout(function() {
    	const swiperElement = document.querySelector('.woocommerce-product-gallery__wrapper:not(.quick-view-gallery)');
    
    	if (swiperElement && swiperElement.swiper) {
    		swiperElement.swiper.on('slideChange', function() {
    
    			jQuery('.woocommerce-product-gallery__wrapper:not(.quick-view-gallery)')
    				.find('.wd-carousel-item.wd-video-playing .wd-play-video')
    				.trigger('click');
    		});
    	}
    }, 5000)

    Kind Regards

Viewing 4 posts - 1 through 4 (of 4 total)