mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -08:00
Update index.js
This commit is contained in:
1 parent
a5cda09e3c
commit
7558d98116
1 file changed
+3
-1
@@ -39,8 +39,8 @@ var art = new Artplayer({
|
|||||||
selector: [
|
selector: [
|
||||||
{
|
{
|
||||||
html: 'Display',
|
html: 'Display',
|
||||||
switch: true,
|
|
||||||
tooltip: 'Show',
|
tooltip: 'Show',
|
||||||
|
switch: true,
|
||||||
onSwitch: function (item) {
|
onSwitch: function (item) {
|
||||||
item.tooltip = item.switch ? 'Hide' : 'Show';
|
item.tooltip = item.switch ? 'Hide' : 'Show';
|
||||||
art.subtitle.show = !item.switch;
|
art.subtitle.show = !item.switch;
|
||||||
@@ -71,8 +71,10 @@ var art = new Artplayer({
|
|||||||
{
|
{
|
||||||
html: 'Custom Switch',
|
html: 'Custom Switch',
|
||||||
icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
|
icon: '<img width="22" heigth="22" src="/assets/img/state.svg">',
|
||||||
|
tooltip: 'OFF',
|
||||||
switch: false,
|
switch: false,
|
||||||
onSwitch: function (item) {
|
onSwitch: function (item) {
|
||||||
|
item.tooltip = item.switch ? 'OFF' : 'ON';
|
||||||
console.info('You clicked on the custom switch', item.switch);
|
console.info('You clicked on the custom switch', item.switch);
|
||||||
return !item.switch;
|
return !item.switch;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user