Widget:视频:修订间差异
来自HUIJIA FUN
Plurimod学生会(留言 | 贡献) 小无编辑摘要 |
Plurimod学生会(留言 | 贡献) 无编辑摘要 标签:已被回退 |
||
| 第4行: | 第4行: | ||
|url=https://vip.123pan.cn/1826204916/5651071 | |url=https://vip.123pan.cn/1826204916/5651071 | ||
|width=640 | |width=640 | ||
|height= | |height=360 | ||
}} | }} | ||
</pre> | </pre> | ||
| 第10行: | 第10行: | ||
|url=https://vip.123pan.cn/1826204916/5651071 | |url=https://vip.123pan.cn/1826204916/5651071 | ||
|width=640 | |width=640 | ||
|height= | |height=360 | ||
}} | }} | ||
| 第18行: | 第18行: | ||
== Using this widget == | == Using this widget == | ||
See [https://www.mediawikiwidgets.org/Video widget description page on MediaWikiWidgets.org]. | |||
== Copy to your site == | == Copy to your site == | ||
Install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy the [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source] to '''{{FULLPAGENAME}}'''. | |||
</noinclude><includeonly> | </noinclude><includeonly> | ||
<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-player { | |||
display: none; | |||
width: 100%; | |||
height: 100%; | |||
object-fit: cover; | |||
} | |||
.video-load-btn { | |||
/* 保持基础样式 */ | |||
position: absolute; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
height: 100%; | |||
background: #4285f4; | |||
color: white; | |||
border: none; | |||
font-size: 18px; | |||
cursor: pointer; | |||
} | border-radius: 6px; | ||
z-index: 2; | |||
/* 移除任何可能的动画或渐变 */ | |||
transition: none; | |||
} | |||
.video-load-btn:hover { | |||
background: #3367d6; | |||
} | |||
</div> | </div> | ||
<script> | |||
function loadWidgetVideo(button) { | |||
const container = button.closest('.video-container'); | |||
const video = container.querySelector('.video-player'); | |||
const url = container.dataset.url; | |||
const width = container.dataset.width; | |||
const height = container.dataset.height; | |||
if (url) { | |||
video.src = url; | |||
video.style.display = 'block'; // 无动画直接显示 | |||
video.width = width; | |||
video.height = height; | |||
button.remove(); | |||
} else { | |||
button.textContent = '⚠️ Video URL Missing'; | |||
} | |||
} | |||
</script> | |||
</includeonly> | </includeonly> | ||
2025年7月5日 (六) 03:44的版本
{{#widget:视频
|url=https://vip.123pan.cn/1826204916/5651071
|width=640
|height=360
}}
This widget lets you embed HTML5 Video Media on your wiki page.
It was created by taipan.
Using this widget
See widget description page on MediaWikiWidgets.org.
Copy to your site
Install MediaWiki Widgets extension and copy the full source to Widget:视频.