New Features
1. New plugin design principle,let writing plugin easy!
Based on the original design experience, it is transformed from the original reference + self-execution method to the configuration input method. At the same time, the plugin writing method is standardized, and more plugin tools that are easy to use are provided to make the development of player plugins more efficient and the code more maintainable.
2. Plugin with lazy load, no worry about a huge number of plugins
In the new version 3.0, the player supports asynchronous plugins. Plugins with high initialization cost and large code size (such as danmu.js) can be loaded and executed after the player is initialized to speed up the initialization speed of the player and improve the user experience. Not only that, but you can also transform mux components (such as Mp4, Flv) into lazy loading mode to make your playback page lighter.
3. Preset mechanism make it easier to combine plugins
When using the player in a project, multiple plugins are often imported, and the plugins used in different scenarios are different. Between the differences of scenarios, we designed the Preset mechanism so that everyone can freely combine plugins into a Preset for reference in different scenarios
4. Convenient way to replace button icons
Based on the original player skin mechanism, we have introduce the ability to change the skin when the plugin is running. All the works for replacing the button with the icon you want is an SVG and a simple API call
5. The control bar buttons set positions more easily
The new player slot mechanism for button placement allows you not to worry about the position of the buttons, you only need to design the position and order of the buttons, and you can position the buttons properly without modifying the style. At the same time, two new slot positions, left and right, are provided, allowing you to easily place buttons on the left and right sides of the screen