Widget:视频:修订间差异

来自HUIJIA FUN
无编辑摘要
无编辑摘要
第27行: 第27行:
   .video-container {
   .video-container {
     position: relative;
     position: relative;
     width: 100%; /* Full width by default */
     width: <!--{$width|default:425|validate:int|escape:'html'}-->px;
     max-width: 640px; /* Optional: limit max width */
     height: <!--{$height|default:355|validate:int|escape:'html'}-->px;
     margin-bottom: 15px;
     margin-bottom: 15px;
    background: #000; /* Optional: placeholder background */
    overflow: hidden;
   }
   }
   .video-load-btn {
   .video-load-btn {
     position: absolute;
     position: absolute;
第43行: 第44行:
     border-radius: 4px;
     border-radius: 4px;
     cursor: pointer;
     cursor: pointer;
     z-index: 10;
     z-index: 2;
   }
   }
   .video-load-btn:hover {
   .video-load-btn:hover {
     background: #3367d6;
     background: #3367d6;
   }
   }
   .video-player {
   .video-player {
     width: 100%;
     width: 100%;
     height: auto; /* Maintain aspect ratio */
     height: 100%;
     display: none;
     display: none;
   }
   }
第58行: 第57行:


<div class="video-container">
<div class="video-container">
   <!-- Load button -->
   <!-- Load Button -->
   <button class="video-load-btn"
   <button class="video-load-btn"
           onclick="const player=this.nextElementSibling; player.style.display='block'; player.src='<!--{$url|validate:url|escape:html|regex_replace:"#^(?!(https?:)?//).*#i":''}-->'; this.remove()">
           onclick="const video = this.nextElementSibling; video.style.display='block'; video.src='<!--{$url|validate:url|escape:html|regex_replace:"#^(?!(https?:)?//).*#i":''}-->'; this.remove();">
     ▶ Load Video
     ▶ Load Video
   </button>
   </button>


   <!-- Video element with volume control -->
   <!-- Video Element -->
   <video class="video-player"
   <video class="video-player"
         controls
         controls
         preload="none">
         preload="none"></video>
    <!-- Volume control is built-in to most modern browsers -->
    Your browser does not support the video tag.
  </video>
</div>
</div>
</includeonly>
</includeonly>

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

{{#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:视频.