--- title: Control Plugin sidebar_position: 5 --- ## Demo 👉 [View Demo](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-control/index.js&example=control) ## Install ### Install from `npm`: ```bash $ npm install artplayer-plugin-control ``` ### Install from `yarn`: ```bash $ yarn add artplayer-plugin-control ``` ### Install from `script`: ```html ``` Then you can access the plugin function through `window.artplayerPluginControl` ## Use
â–¶ Run Code
```js var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', fullscreen: true, fullscreenWeb: true, plugins: [ artplayerPluginControl(), ], }); ``` ## Api ### enable - Type: `Getter/Setter` Whether to enable the new control UI
â–¶ Run Code
```js var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', fullscreen: true, fullscreenWeb: true, controls: [ { position: 'right', html: '', click: function () { const { enable } = art.plugins.artplayerPluginControl; art.plugins.artplayerPluginControl.enable = !enable; }, }, ], plugins: [ artplayerPluginControl(), ], }); ``