mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 08:51:20 -08:00
Update control.js
This commit is contained in:
1 parent
5421ccc9d6
commit
46af8a32d7
1 file changed
+15
-11
@@ -14,17 +14,6 @@ var art = new Artplayer({
|
|||||||
miniProgressBar: true,
|
miniProgressBar: true,
|
||||||
airplay: true,
|
airplay: true,
|
||||||
theme: '#23ade5',
|
theme: '#23ade5',
|
||||||
quality: [
|
|
||||||
{
|
|
||||||
default: true,
|
|
||||||
html: 'SD 480P',
|
|
||||||
url: '/assets/sample/video.mp4',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
html: 'HD 720P',
|
|
||||||
url: '/assets/sample/video.mp4',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
thumbnails: {
|
thumbnails: {
|
||||||
url: '/assets/sample/thumbnails.png',
|
url: '/assets/sample/thumbnails.png',
|
||||||
number: 60,
|
number: 60,
|
||||||
@@ -66,6 +55,21 @@ var art = new Artplayer({
|
|||||||
state: '<img width="150" heigth="150" src="/assets/img/state.svg">',
|
state: '<img width="150" heigth="150" src="/assets/img/state.svg">',
|
||||||
indicator: '<img width="16" heigth="16" src="/assets/img/indicator.svg">',
|
indicator: '<img width="16" heigth="16" src="/assets/img/indicator.svg">',
|
||||||
},
|
},
|
||||||
|
settings: [
|
||||||
|
{
|
||||||
|
html: 'Control UI',
|
||||||
|
icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
|
||||||
|
tooltip: 'OFF',
|
||||||
|
switch: true,
|
||||||
|
onSwitch: async function (item) {
|
||||||
|
item.tooltip = item.switch ? 'OFF' : 'ON';
|
||||||
|
art.plugins.artplayerPluginControl.enable = !item.switch;
|
||||||
|
await Artplayer.utils.sleep(300);
|
||||||
|
art.setting.updateStyle();
|
||||||
|
return !item.switch;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
artplayerPluginControl()
|
artplayerPluginControl()
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in new issue
Block a user