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 ` -
+
`