add mobile playsInline

This commit is contained in:
Harvey committed 2022-03-23 16:44:01 +08:00
1 parent cc39bed24d
commit d43057c8af
2 files changed
+6 -1

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@
"dependencies": { "dependencies": {
"@docusaurus/core": "2.0.0-beta.15", "@docusaurus/core": "2.0.0-beta.15",
"@docusaurus/preset-classic": "2.0.0-beta.15", "@docusaurus/preset-classic": "2.0.0-beta.15",
"@mdx-js/react": "^2.1.0", "@mdx-js/react": "^1.6.22",
"@svgr/webpack": "^6.1.0", "@svgr/webpack": "^6.1.0",
"clsx": "^1.1.1", "clsx": "^1.1.1",
"docusaurus-lunr-search": "^2.1.15", "docusaurus-lunr-search": "^2.1.15",
+5
View File
@@ -35,6 +35,11 @@ export default class Mobile {
$video.autoplay = option.autoplay; $video.autoplay = option.autoplay;
} }
if (option.playsInline) {
$video.playsInline = true;
$video['webkit-playsinline'] = true;
}
const typeName = option.type || getExt(option.url); const typeName = option.type || getExt(option.url);
const typeCallback = option.customType[typeName]; const typeCallback = option.customType[typeName];
if (typeName && typeCallback) { if (typeName && typeCallback) {