微件:视频:修订间差异

来自SOKA CAFE
铃鸣万魔殿
铃鸣万魔殿留言 | 贡献 (修改页面)
 
(未显示同一用户的1个中间版本)
第1行: 第1行:
<includeonly>
<includeonly>
<script src="//api.html5media.info/1.2.2/html5media.min.js"></script><video src="<!--{$url|validate:url|escape:html|regex_replace:"#^(?!(https?:)?//).*#i":''}-->" width="<!--{$width|default:425|validate:int|escape:'html'}-->" height="<!--{$height|default:355|validate:int|escape:'html'}-->" controls preload></video>
<script src="//api.html5media.info/1.2.2/html5media.min.js"></script>
<style>
  .video-container {
    position: relative;
    width: <!--{$width|default:425|validate:int|escape:'html'}-->px;
    height: <!--{$height|default:355|validate:int|escape:'html'}-->px;
    margin-bottom: 15px;
  }
  .video-load-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px 20px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
  }
  .video-load-btn:hover {
    background: #3367d6;
  }
  .video-player {
    width: 100%;
    height: 100%;
    display: none;
  }
</style>
 
<div class="video-container">
  <!-- Button will be removed after click -->
  <button class="video-load-btn"
          onclick="this.nextElementSibling.style.display='block'; this.nextElementSibling.src='<!--{$url|validate:url|escape:html|regex_replace:"#^(?!(https?:)?//).*#i":''}-->'; this.remove()">
    ▶ Load Video
  </button>
  <!-- Video element (hidden by default) -->
  <video class="video-player"
        width="<!--{$width|default:425|validate:int|escape:'html'}-->"  
        height="<!--{$height|default:355|validate:int|escape:'html'}-->"  
        controls  
        preload="none"></video>
</div>
</includeonly>
</includeonly>
<noinclude>__NOTOC__
<noinclude>__NOTOC__
第10行: 第53行:
<pre>
<pre>
{{#widget:视频
{{#widget:视频
|url=https://vip.123pan.cn/1826204916/Dipfield/%E5%96%86%E6%BC%94%E8%AE%B2.mp4
|url=https://vip.123pan.cn/1826204916/10004948
|width=640
|width=640
|height=auto
|height=auto
第16行: 第59行:
</pre>
</pre>
{{#widget:视频
{{#widget:视频
|url=https://vip.123pan.cn/1826204916/Dipfield/%E5%96%86%E6%BC%94%E8%AE%B2.mp4
|url=https://vip.123pan.cn/1826204916/10004948
|width=640
|width=640
|height=auto
|height=auto

2025年4月6日 (日) 05:48的最新版本


信息

来源

It was created by taipan.

说明

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

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

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 微件:视频.