mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-10 12:46:15 -08:00
- Updated the way properties from the shim instance and its prototype are retrieved. - Replaced the for-in loop with a Set to ensure all properties, including inherited ones, are considered. - Excluded the 'constructor' property from being added to the canvas. refactor: remove unused utility functions and streamline event handling - Deleted `videoEvents.js`, `clamp.js`, and `sleep.js` as they were not utilized. - Introduced a new `EventTarget` class to manage event listeners more efficiently. - Enhanced `MediaBunnyEngine`, `AudioEngine`, `VideoEngine`, and `VideoShim` to utilize the new event system. - Updated type definitions in `artplayer-proxy-mediabunny.d.ts` to include new configuration options. - Added comprehensive architecture documentation to clarify the structure and flow of the MediaBunny engine. - Refactored the codebase for improved readability and maintainability, including better naming conventions and JSDoc comments.
25 lines
647 B
JavaScript
25 lines
647 B
JavaScript
// npm i artplayer-proxy-mediabunny
|
|
// import artplayerProxyMediabunny from 'artplayer-proxy-mediabunny';
|
|
|
|
const art = new Artplayer({
|
|
container: '.artplayer-app',
|
|
url: 'https://artplayer.org/assets/sample/frag_bunny.mp4',
|
|
autoSize: false,
|
|
screenshot: true,
|
|
setting: true,
|
|
loop: true,
|
|
flip: true,
|
|
playbackRate: true,
|
|
fullscreen: true,
|
|
fullscreenWeb: true,
|
|
miniProgressBar: true,
|
|
autoPlayback: true,
|
|
autoOrientation: true,
|
|
thumbnails: {
|
|
url: '/assets/sample/frag_bunny.png',
|
|
number: 60,
|
|
column: 10,
|
|
scale: 0.85,
|
|
},
|
|
proxy: artplayerProxyMediabunny(),
|
|
}) |