js:wrap_autoplay

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
js:wrap_autoplay [2026/06/12 12:07] – créée avillepreuxjs:wrap_autoplay [2026/06/12 12:19] (Version actuelle) avillepreux
Ligne 1: Ligne 1:
 <JS> <JS>
  
-jQuery(function() {+jQuery(document).ready(function() { if (typeof(wrap_autoplay) === 'undefined') { wrap_autoplay = true;
  
-  jQuery(".plugin_wrap.wrap_autoplay video").each(function() { +  document.querySelectorAll(".plugin_wrap.wrap_autoplay video").forEach(function(video) { 
-   + 
-    var video = jQuery(this); + video.setAttribute("muted",    ""); 
-    video.play();+ video.setAttribute("autoplay", ""); 
 + video.setAttribute("loop",      ""); 
 + video.setAttribute("playsinline", ""); 
 + video.setAttribute("preload", "auto"); 
 + 
 + video.muted  = true; 
 +  video.volume = 0; 
 + 
 + video.play();
   });   });
      
-});+});
  
 </JS> </JS>
  
  • js/wrap_autoplay.1781258850.txt.gz
  • Dernière modification : 2026/06/12 12:07
  • de avillepreux