Widget:视频:修订间差异

来自HUIJIA FUN
无编辑摘要
标签手工回退
无编辑摘要
第55行: 第55行:


<div class="video-container">
<div class="video-container">
  <!-- Button will be removed after click -->
   <button class="video-load-btn" onclick="
   <button class="video-load-btn"  
    const video = this.nextElementSibling;
          onclick="this.nextElementSibling.style.display='block'; this.nextElementSibling.src='<!--{$url|validate:url|escape:html|regex_replace:"#^(?!(https?:)?//).*#i":''}-->'; this.remove()">
    video.style.display = 'block';
    video.src = '<!--{$url|validate:url|escape:html|regex_replace:"#^(?!(https?:)?//).*#i":''}-->';
    video.muted = false;
    video.volume = 1;
    video.play().catch(() => console.warn('Autoplay blocked, user interaction required.'));
    this.remove();
  ">
     ▶ Load Video
     ▶ Load Video
   </button>
   </button>
  <!-- Video element (hidden by default) -->
 
   <video class="video-player"  
   <video class="video-player"
         width="<!--{$width|default:425|validate:int|escape:'html'}-->"  
         width="<!--{$width|default:425|validate:int|escape:'html'}-->"
         height="<!--{$height|default:355|validate:int|escape:'html'}-->"  
         height="<!--{$height|default:355|validate:int|escape:'html'}-->"
         controls  
         controls
         preload="none"></video>
         preload="none">
  </video>
</div>
</div>
</includeonly>
</includeonly>

2025年7月12日 (六) 14:00的版本

{{#widget:视频
|url=https://vip.123pan.cn/1826204916/5651071
|width=640
|height=auto
}}

This widget lets you embed HTML5 Video Media on your wiki page.

It was created by taipan.

Using this widget

For information on how to use this widget, see widget description page on MediaWikiWidgets.org.

Copy to your site

To use this widget on your site, install MediaWiki Widgets extension and copy the complete source code of this page to your wiki as page Widget:视频.