浏览代码

相册确保预览不会发声

moshaorui 1 天之前
父节点
当前提交
83c3329054
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      resources/views/gallery-detail.blade.php

+ 2 - 0
resources/views/gallery-detail.blade.php

@@ -325,6 +325,8 @@
                     height: $img.height(),
                     display: 'none' // Initially hidden until loaded
                 }
+            }).on('loadedmetadata', function() {
+                $(this).prop('muted', true); // 确保静音
             });
 
             if (loadIndexes[index] === 0 && videoUrl != "") {