From a8c21b28a4f6631384b7bd6db539d8898949c1d8 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sun, 14 Jan 2024 11:15:37 +0800 Subject: [PATCH] [feat] video width & autoplay --- scripts/tags/lib/video.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/tags/lib/video.js b/scripts/tags/lib/video.js index 48e6e19..9be6d7f 100644 --- a/scripts/tags/lib/video.js +++ b/scripts/tags/lib/video.js @@ -9,22 +9,22 @@ 'use strict'; module.exports = ctx => function(args) { - args = ctx.args.map(args, ['type', 'bilibili', 'ratio'], ['src']) + args = ctx.args.map(args, ['type', 'bilibili', 'ratio', 'width', 'autoplay'], ['src']) + if (args.width == null) { + args.width = '100%' + } if (args.bilibili) { return ` -
-
` } - if (args.type == null) { - args.type = 'video/mp4' - } return ` -
+
`