Widget:视频:修订间差异

来自HUIJIA FUN
无编辑摘要
无编辑摘要
标签已被回退
第26行: 第26行:
<script src="//api.html5media.info/1.2.2/html5media.min.js"></script>
<script src="//api.html5media.info/1.2.2/html5media.min.js"></script>
<style>
<style>
   .video-container {
   .video-embed-wrapper {
    display: inline-block;
    margin: 15px 0;
     position: relative;
     position: relative;
     width: <!--{$width|default:425|validate:int|escape:'html'}-->px;
     width: <!--{$width|default:425|validate:int|escape:'html'}-->px;
     height: <!--{$height|default:355|validate:int|escape:'html'}-->px;
     height: <!--{$height|default:355|validate:int|escape:'html'}-->px;
     margin-bottom: 15px;
     background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    vertical-align: top;
  }
 
  .video-load-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.03);
   }
   }
 
   .video-load-btn {
   .video-load-btn {
    position: absolute;
     padding: 12px 24px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
     padding: 10px 20px;
     background: #4285f4;
     background: #4285f4;
     color: white;
     color: white;
第43行: 第55行:
     border-radius: 4px;
     border-radius: 4px;
     cursor: pointer;
     cursor: pointer;
     z-index: 10;
     font-size: 15px;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
   }
   }
 
   .video-load-btn:hover {
   .video-load-btn:hover {
     background: #3367d6;
     background: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
   }
   }
 
   .video-player {
   .video-player {
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
     display: none;
     display: none;
    background: #000;
   }
   }
</style>
</style>


<div class="video-container">
<div class="video-embed-wrapper">
   <!-- Button will be removed after click -->
   <div class="video-load-container">
  <button class="video-load-btn"  
    <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()">
            onclick="this.parentElement.style.display='none'; this.nextElementSibling.style.display='block'; this.nextElementSibling.src='<!--{$url|validate:url|escape:html|regex_replace:"#^(?!(https?:)?//).*#i":''}-->'">
    Load Video
      ▶ Load Video
  </button>
    </button>
   <!-- Video element (hidden by default) -->
   </div>
   <video class="video-player"  
   <video class="video-player"  
         width="<!--{$width|default:425|validate:int|escape:'html'}-->"  
         width="<!--{$width|default:425|validate:int|escape:'html'}-->"  

2025年4月5日 (六) 21:38的版本

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