refactor: remove architecture documentation and improve code readability

- Deleted ARCHITECTURE.md file to streamline project documentation.
- Refactored AudioEngine, EventTarget, MediaBunnyEngine, VideoEngine, VideoShim, and index.js for improved readability by adding consistent line breaks and spacing.
- Enhanced code structure by ensuring single-responsibility principles and clearer flow in methods.
- Updated TypeScript definitions for better clarity on options available in the artplayer-proxy-mediabunny package.
This commit is contained in:
Harvey Zhao committed 2026-01-01 17:25:21 +08:00
1 parent be44c1f8dd
commit 9d760a2f59
10 files changed
+164 -275

No files matched your search

@@ -37,7 +37,8 @@ export default function artplayerProxyMediabunny(option = {}) {
// Add shim properties to canvas
for (const prop of propertyNames) {
if (prop === 'constructor') continue
if (prop === 'constructor')
continue
if (!(prop in canvas)) {
Object.defineProperty(canvas, prop, {
get() {
@@ -61,7 +62,8 @@ export default function artplayerProxyMediabunny(option = {}) {
// Handle resize
function resize() {
const player = art.template?.$player
if (!player || art.option.autoSize) return
if (!player || art.option.autoSize)
return
Object.assign(canvas.style, {
width: '100%',