import{_ as n,o as l,c as p,S as s,k as a}from"./chunks/framework.532b6b18.js";const h=JSON.parse('{"title":"控制器皮肤","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/control-ui.md","filePath":"plugin/control-ui.md","lastUpdated":1673441101000}'),e={name:"plugin/control-ui.md"},o=s('
👉 查看完整演示
npm install artplayer-plugin-controlyarn add artplayer-plugin-controlpnpm add artplayer-plugin-control<script src="path/to/artplayer-plugin-control.js"></script>https://cdn.jsdelivr.net/npm/artplayer-plugin-control/dist/artplayer-plugin-control.jshttps://unpkg.com/artplayer-plugin-control/dist/artplayer-plugin-control.jsvar art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
fullscreen: true,
fullscreenWeb: true,
plugins: [
artplayerPluginControl(),
],
});enable Getter/SetterBoolean是否启用新的控制器皮肤
`,4),c=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),i=s(`var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
fullscreen: true,
fullscreenWeb: true,
controls: [
{
position: 'right',
html: '<button type="button">Switch UI</button>',
click: function () {
const { enable } = art.plugins.artplayerPluginControl;
art.plugins.artplayerPluginControl.enable = !enable;
},
},
],
plugins: [
artplayerPluginControl(),
],
});