Warning: is_readable(): open_basedir restriction in effect. File(/gitinfo/info.json) is not within the allowed path(s): (/www/wwwroot/wiki.guguwo.top/:/tmp/) in /www/wwwroot/wiki.guguwo.top/includes/utils/GitInfo.php on line 177
模板:APlayer - 咕咕窝wiki

模板:APlayer

来自咕咕窝wiki
卡介菌讨论 | 贡献2025年3月16日 (日) 06:21的版本

<script> (function() {

   var ap = new APlayer({
       container: document.getElementById('aplayer-{{#var:id}}'),
       theme: '{{#var:theme | #f5f5f5}}', // 默认主题
       loop: '{{#var:loop | all}}',       // 默认循环播放
       preload: '{{#var:preload | auto}}', // 默认自动预加载
       volume: {{#var:volume | 0.7}},      // 默认音量
       mutex: true,                        // 互斥播放
       listFolded: {{#var:listFolded | false}}, // 默认不折叠列表
       listMaxHeight: '{{#var:listMaxHeight | 300px}}', // 列表最大高度
       audio: [
           {{#forargs:song|index|value|
               {
                   name: '{{#var:song模板:Index_name}}',
                   artist: '{{#var:song模板:Index_artist}}',
                   url: '{{#var:song模板:Index_url}}',
                   cover: '{{#var:song模板:Index_cover}}',
               },
           }}
       ]
   });
   // Widgets 集成 (如果需要)
   if (window.Widget) {
       Widget.instance.registerAPlayer(ap);
   }

})(); </script>

模板:Documentation