Update video.html

This commit is contained in:
Vaica committed 2026-06-22 17:08:07 +08:00
1 parent cc93828b9b
commit 9838d16324
1 file changed
+6 -1
+6 -1
View File
@@ -43,6 +43,11 @@
{{ $src := .Get "src" }}
{{ $poster := .Get "poster" }}
{{ $caption := .Get "caption" }}
{{/* 自动补全 Page Bundle 路径 */}}
{{ $videoSrc := $src }}
{{ if not (hasPrefix $src "http") }}
{{ $videoSrc = printf "/%s/%s" .Page.Slug $src }}
{{ end }}
<figure class="post-video-wrapper">
<div class="video-container">
<video
@@ -52,7 +57,7 @@
playsinline
webkit-playsinline
>
<source src="{{ $src }}">
<source src="{{ $videoSrc }}">
你的浏览器不支持视频播放。
</video>
</div>