add autoPlayback

This commit is contained in:
Harvey authored and Harvey Zack committed 2022-04-25 15:38:26 +08:00
1 parent b46dacd353
commit 429753aa6e
57 files changed
+528 -454

No files matched your search

+1
View File
@@ -147,6 +147,7 @@ export default class Artplayer extends Emitter {
useSSR: false,
playsInline: true,
lock: true,
autoPlayback: false,
ads: [],
layers: [],
contextmenu: [],
+4 -2
View File
@@ -1,7 +1,7 @@
import { errorHandle, isMobile, has, def } from '../utils';
import miniProgressBar from './miniProgressBar';
import lock from './lock';
import autoPlayback from './autoPlayback';
import lock from './lock';
export default class Plugins {
constructor(art) {
@@ -18,7 +18,9 @@ export default class Plugins {
this.add(lock);
}
this.add(autoPlayback);
if (option.autoPlayback) {
this.add(autoPlayback);
}
for (let index = 0; index < option.plugins.length; index++) {
this.add(option.plugins[index]);
+1
View File
@@ -57,6 +57,7 @@ export default {
useSSR: b,
playsInline: b,
lock: b,
autoPlayback: b,
ads: [
{
url: s,