mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 00:31:20 -08:00
update docs
This commit is contained in:
1 parent
7558d98116
commit
92348f004d
47 files changed
+152
-136
No files matched your search
@@ -132,6 +132,7 @@ var art = new Artplayer({
|
||||
settings: [
|
||||
{
|
||||
html: 'PIP Mode',
|
||||
tooltip: 'OFF',
|
||||
icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
|
||||
switch: false,
|
||||
onSwitch: function (item, $dom, event) {
|
||||
@@ -139,6 +140,9 @@ var art = new Artplayer({
|
||||
const nextState = !item.switch;
|
||||
art.pip = nextState;
|
||||
|
||||
// Change the tooltip
|
||||
item.tooltip = nextState ? 'ON' : 'OFF';
|
||||
|
||||
// Change the switch state
|
||||
return nextState;
|
||||
},
|
||||
@@ -163,12 +167,16 @@ var art = new Artplayer({
|
||||
},
|
||||
{
|
||||
html: 'Setting 04',
|
||||
icon: '',
|
||||
switch: true,
|
||||
onSwitch: function (item, $dom, event) {
|
||||
return !item.switch;
|
||||
},
|
||||
},
|
||||
],
|
||||
onSelect: function (item) {
|
||||
return item.html;
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -134,6 +134,7 @@ var art = new Artplayer({
|
||||
settings: [
|
||||
{
|
||||
html: '画中画模式',
|
||||
tooltip: '关闭',
|
||||
icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
|
||||
switch: false,
|
||||
onSwitch: function (item, $dom, event) {
|
||||
@@ -141,6 +142,9 @@ var art = new Artplayer({
|
||||
const nextState = !item.switch;
|
||||
art.pip = nextState;
|
||||
|
||||
// 改变提示文本
|
||||
item.tooltip = nextState ? '开启' : '关闭';
|
||||
|
||||
// 改变按钮状态
|
||||
return nextState;
|
||||
},
|
||||
@@ -165,12 +169,16 @@ var art = new Artplayer({
|
||||
},
|
||||
{
|
||||
html: '设置 04',
|
||||
icon: '',
|
||||
switch: true,
|
||||
onSwitch: function (item, $dom, event) {
|
||||
return !item.switch;
|
||||
},
|
||||
},
|
||||
],
|
||||
onSelect: function (item) {
|
||||
return item.html;
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user