Home Forums WoodMart support forum Set video to not repeat

Set video to not repeat

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #466240

    ToriTori38
    Participant

    Hello,

    The new video option inside the shop thumbnail gallery is great but has one problem. The video is in a loop and does not stop playing. So when user navigates away to a different image it is still playing in background which is very annoying if sound is on. How can we ensure video only plays once and does not loop indefinately?

    Thanks

    #466276

    Luke Nielsen
    Keymaster

    Hello,

    The below code will help you to stop the video after changing the product thumbnail, please add it to the “On document ready” area in Theme Settings -> Custom JS.

    (function($) {
    	$('.woocommerce-product-gallery__wrapper:not(.quick-view-gallery)').on('changed.owl.carousel', function(e) {
    		$('.woocommerce-product-gallery__wrapper:not(.quick-view-gallery)').find('.product-image-wrap.wd-video-playing .wd-play-video').trigger('click');
    	});
    })(jQuery);

    Kind Regards

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