mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-11 13:56:15 -08:00
update docs
This commit is contained in:
1 parent
ac490964eb
commit
78d22e4e54
62 files changed
+293
-189
No files matched your search
@@ -1 +1 @@
|
||||
[{"title":"Add button to the controls","type":0,"sectionRef":"#","url":"en/Questions/Create_button_in_the_controls","content":"Add button to the controls ▶ Run Code var time = 0; var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', controls: [ { position: 'right', html: '<button type="button">Click Me!</button>', click: function (_, event) { // The second parameter is an event object time += 1; event.target.innerText = 'You Click ' + time; }, }, ], }); ","keywords":""},{"title":"Danmuku plugin","type":0,"sectionRef":"#","url":"en/Plugins/danmuku","content":"Danmuku plugin Tip The documentation of the current danmaku library plug-in, only the Chinese version 👉 https://artplayer.org/document/zh-cn/Plugins/danmuku/","keywords":""},{"title":"Hls Quality Plugin","type":0,"sectionRef":"#","url":"en/Plugins/hls-quality","content":"","keywords":""},{"title":"Overview","type":1,"pageTitle":"Hls Quality Plugin","url":"en/Plugins/hls-quality#overview","content":"With this plugin, you can add the Hls video quality list to the control or the settings panel "},{"title":"Demo","type":1,"pageTitle":"Hls Quality Plugin","url":"en/Plugins/hls-quality#demo","content":"👉 View Demo "},{"title":"Install","type":1,"pageTitle":"Hls Quality Plugin","url":"en/Plugins/hls-quality#install","content":""},{"title":"Install from npm:","type":1,"pageTitle":"Hls Quality Plugin","url":"en/Plugins/hls-quality#install-from-npm","content":"$ npm install artplayer-plugin-hls-quality "},{"title":"Install from yarn:","type":1,"pageTitle":"Hls Quality Plugin","url":"en/Plugins/hls-quality#install-from-yarn","content":"$ yarn add artplayer-plugin-hls-quality "},{"title":"Install from script:","type":1,"pageTitle":"Hls Quality Plugin","url":"en/Plugins/hls-quality#install-from-script","content":"<!-- local --> <script src="path/to/artplayer-plugin-hls-quality.js"></script> <!-- jsdelivr --> <script src="https://cdn.jsdelivr.net/npm/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js"></script> <!-- unpkg --> <script src="https://unpkg.com/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js"></script> Then you can access the plugin function through window.artplayerPluginHlsQuality "},{"title":"Static propertys","type":0,"sectionRef":"#","url":"class","content":"","keywords":""},{"title":"instances","type":1,"pageTitle":"Static propertys","url":"class#instances","content":"Type: Array A array that saves all player instances, and can manage multiple instances through this property when multiple players exist at the same time. ▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', }); art.on('ready', () => { console.info(Artplayer.instances); }); "},{"title":"version","type":1,"pageTitle":"Static propertys","url":"class#version","content":"Type: String Current player version number ▶ Run Code console.info(Artplayer.version); "},{"title":"env","type":1,"pageTitle":"Static propertys","url":"class#env","content":"Type: String Current player environment variable ▶ Run Code console.info(Artplayer.env); "},{"title":"utils","type":1,"pageTitle":"Static propertys","url":"class#utils","content":"Type: Object Common utils for player ▶ Run Code console.info(Artplayer.utils); "},{"title":"config","type":1,"pageTitle":"Static propertys","url":"class#config","content":"Type: Object Store native properties and methods of video ▶ Run Code console.info(Artplayer.config); "},{"title":"scheme","type":1,"pageTitle":"Static propertys","url":"class#scheme","content":"Type: Object Verification scheme for player option ▶ Run Code console.info(Artplayer.scheme); "},{"title":"validator","type":1,"pageTitle":"Static propertys","url":"class#validator","content":"Type: Function Validator for player option "},{"title":"option","type":1,"pageTitle":"Static propertys","url":"class#option","content":"Type: Object Player default option ▶ Run Code console.info(Artplayer.option); "},{"title":"html","type":1,"pageTitle":"Static propertys","url":"class#html","content":"Type: String Player defaults HTML String, usually used for SSR ▶ Run Code console.info(Artplayer.html); "},{"title":"kindOf","type":1,"pageTitle":"Static propertys","url":"class#kindof","content":"Type: Function JS type identification function ▶ Run Code console.info(Artplayer.kindOf('0')); console.info(Artplayer.kindOf(0)); console.info(Artplayer.kindOf({})); console.info(Artplayer.kindOf([])); "},{"title":"How to import types","type":0,"sectionRef":"#","url":"en/Questions/How_to_import_types","content":"How to import types Sometimes you lose TypeScript syntax prompt, then you can import types manually /** * @typedef { import("artplayer/types/artplayer") } Artplayer */ /** * @type {Artplayer} - An Artplayer instance. Line truncated
|
||||
[{"title":"Danmuku plugin","type":0,"sectionRef":"#","url":"en/Plugins/danmuku","content":"Danmuku plugin Tip The documentation of the current danmaku library plug-in, only the Chinese version 👉 https://artplayer.org/document/zh-cn/Plugins/danmuku/","keywords":""},{"title":"Hls Quality Plugin","type":0,"sectionRef":"#","url":"en/Plugins/hls-quality","content":"","keywords":""},{"title":"Overview","type":1,"pageTitle":"Hls Quality Plugin","url":"en/Plugins/hls-quality#overview","content":"With this plugin, you can add the Hls video quality list to the control or the settings panel "},{"title":"Demo","type":1,"pageTitle":"Hls Quality Plugin","url":"en/Plugins/hls-quality#demo","content":"👉 View Demo "},{"title":"Install","type":1,"pageTitle":"Hls Quality Plugin","url":"en/Plugins/hls-quality#install","content":""},{"title":"Install from npm:","type":1,"pageTitle":"Hls Quality Plugin","url":"en/Plugins/hls-quality#install-from-npm","content":"$ npm install artplayer-plugin-hls-quality "},{"title":"Install from yarn:","type":1,"pageTitle":"Hls Quality Plugin","url":"en/Plugins/hls-quality#install-from-yarn","content":"$ yarn add artplayer-plugin-hls-quality "},{"title":"Install from script:","type":1,"pageTitle":"Hls Quality Plugin","url":"en/Plugins/hls-quality#install-from-script","content":"<!-- local --> <script src="path/to/artplayer-plugin-hls-quality.js"></script> <!-- jsdelivr --> <script src="https://cdn.jsdelivr.net/npm/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js"></script> <!-- unpkg --> <script src="https://unpkg.com/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js"></script> Then you can access the plugin function through window.artplayerPluginHlsQuality "},{"title":"Static propertys","type":0,"sectionRef":"#","url":"class","content":"","keywords":""},{"title":"instances","type":1,"pageTitle":"Static propertys","url":"class#instances","content":"Type: Array A array that saves all player instances, and can manage multiple instances through this property when multiple players exist at the same time. ▶ Run Code var art = new Artplayer({ container: '.artplayer-app', url: '/assets/sample/video.mp4', }); art.on('ready', () => { console.info(Artplayer.instances); }); "},{"title":"version","type":1,"pageTitle":"Static propertys","url":"class#version","content":"Type: String Current player version number ▶ Run Code console.info(Artplayer.version); "},{"title":"env","type":1,"pageTitle":"Static propertys","url":"class#env","content":"Type: String Current player environment variable ▶ Run Code console.info(Artplayer.env); "},{"title":"utils","type":1,"pageTitle":"Static propertys","url":"class#utils","content":"Type: Object Common utils for player ▶ Run Code console.info(Artplayer.utils); "},{"title":"config","type":1,"pageTitle":"Static propertys","url":"class#config","content":"Type: Object Store native properties and methods of video ▶ Run Code console.info(Artplayer.config); "},{"title":"scheme","type":1,"pageTitle":"Static propertys","url":"class#scheme","content":"Type: Object Verification scheme for player option ▶ Run Code console.info(Artplayer.scheme); "},{"title":"validator","type":1,"pageTitle":"Static propertys","url":"class#validator","content":"Type: Function Validator for player option "},{"title":"option","type":1,"pageTitle":"Static propertys","url":"class#option","content":"Type: Object Player default option ▶ Run Code console.info(Artplayer.option); "},{"title":"html","type":1,"pageTitle":"Static propertys","url":"class#html","content":"Type: String Player defaults HTML String, usually used for SSR ▶ Run Code console.info(Artplayer.html); "},{"title":"kindOf","type":1,"pageTitle":"Static propertys","url":"class#kindof","content":"Type: Function JS type identification function ▶ Run Code console.info(Artplayer.kindOf('0')); console.info(Artplayer.kindOf(0)); console.info(Artplayer.kindOf({})); console.info(Artplayer.kindOf([])); "},{"title":"Control Plugin","type":0,"sectionRef":"#","url":"en/Plugins/control","content":"","keywords":""},{"title":"Demo","type":1,"pageTitle":"Control Plugin","url":"en/Plugins/control#demo","content":"👉 View Demo "},{"title":"Install","type":1,"pageTitle":"Control Plugin","url":"en/Plugins/control#install","content":""},{"title":"Install from npm:","type":1,"pageTitle":"Control Plugin","url":"en/Plugins/control#install-from-npm","content":"$ npm install artplayer-plugin-control "},{"title":"Install from yarn:","type":1,"pageTitle":"Control Plugin","url":"en/Plugins/control#install-from-yarn","content":"$ yarn add artplayer-plugin-control "},{"title":"Install from script:","type":1,"pageTitle":"Control Plugin","url":"en/Plugins/control#install-from-script","content":"<!-- local --> <script src="path/to/artplayer-plugin-cLine truncated
|
||||
Reference in new issue
Block a user