Browse Source

feat: support .webm videos in Video Shortcode

Close #1226
George Cushen 6 years ago
parent
commit
e24de2a2ca
1 changed files with 1 additions and 1 deletions
  1. 1 1
      layouts/shortcodes/video.html

+ 1 - 1
layouts/shortcodes/video.html

@@ -7,7 +7,7 @@
 {{ end }}
 
 {{ $video := printf "%s%s" $path (.Get "src") }}
-{{ $video_type := substr (.Get "src") -1 3 }}
+{{ $video_type := strings.TrimPrefix "." (path.Ext (.Get "src")) }}
 {{ if .Get "library" }}
   {{ $video = $video | relURL }}
 {{ end }}