add setting to mobile demo

This commit is contained in:
Harvey committed 2022-03-23 17:09:07 +08:00
1 parent d43057c8af
commit b3e3d2fe62
4 files changed
+114 -77

No files matched your search

+25
View File
@@ -8,6 +8,10 @@ var art = new Artplayer({
autoSize: true,
loop: true,
mutex: true,
setting: true,
flip: true,
playbackRate: true,
aspectRatio: true,
theme: '#ff0057',
fullscreen: true,
fullscreenWeb: true,
@@ -54,6 +58,27 @@ var art = new Artplayer({
synchronousPlayback: false,
}),
],
settings: [
{
width: 200,
html: '自定义设置',
tooltip: '提示',
icon: '<img width="22" heigth="22" src="/assets/img/indicator.svg">',
selector: [
{
default: true,
html: '设置 01',
},
{
html: '设置 02',
},
],
onSelect: function (item) {
console.info('你点击了', item.html);
return item.html;
},
},
],
whitelist: ['*'],
});