mirror of
https://github.com/zoriya/v10.git
synced 2026-08-12 00:49:29 +00:00
refactor(packages)!: replace DelegateMixin & ProxyMixin with MediaHost base classes (#1292)
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
* - Define files: packages/html/src/define/media/*.ts with inline class + static tagName
|
||||
* - Media element classes: packages/html/src/media/{name}/index.ts
|
||||
* composed as MediaPropsMixin(MediaAttachMixin(CustomMedia), Delegate)
|
||||
* - Delegate classes: packages/core/src/dom/media/{name}/index.ts with getter/setter pairs
|
||||
* - Delegate classes: packages/core/src/dom/media/{name}/index.ts with getter/setter pairs.
|
||||
* CustomMedia classes use inheritance mixins (e.g., HlsMediaMixin(CustomVideoElement)).
|
||||
* - Shared data: packages/core/src/dom/media/custom-media-element/index.ts
|
||||
* exports Attributes, Events, VideoCSSVars, AudioCSSVars, and template functions
|
||||
* - Slots: parsed from getVideoTemplateHTML / getAudioTemplateHTML in custom-media-element
|
||||
@@ -454,7 +455,7 @@ function parseSlots(html: string, slots: string[]): void {
|
||||
|
||||
/**
|
||||
* Determine whether a CustomMedia base class is video or audio by checking
|
||||
* the extends clause of the class that defines it (e.g., DelegateMixin(CustomVideoElement, ...)).
|
||||
* the extends clause of the class that defines it (e.g., HlsMediaMixin(CustomVideoElement)).
|
||||
*/
|
||||
function resolveMediaType(
|
||||
mediaFilePath: string,
|
||||
|
||||
@@ -1194,7 +1194,7 @@ describe('Media element pipeline (end-to-end)', () => {
|
||||
// ─────────────────────────────────────────────────────────────────
|
||||
//
|
||||
// A media element whose delegate extends another delegate (mirrors
|
||||
// MuxMediaDelegate extending HlsMediaDelegate). The builder must
|
||||
// MuxMediaBase extending HlsMediaBase). The builder must
|
||||
// walk the extends chain to include inherited properties. Child
|
||||
// properties override parent definitions.
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Mock complex delegate — mirrors HlsMediaDelegate.
|
||||
* Mock complex delegate — mirrors HlsMediaBase.
|
||||
*
|
||||
* Exercises: multiple getter/setter pairs with JSDoc descriptions,
|
||||
* readonly properties, boolean type, overlap with native Attributes
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Mock extending delegate — mirrors MuxMediaDelegate extending HlsMediaDelegate.
|
||||
* Mock extending delegate — mirrors MuxMediaBase extending HlsMediaBase.
|
||||
*
|
||||
* Exercises: delegate inheritance. The builder must walk the extends chain
|
||||
* to extract properties from both this class and its parent (ComplexDelegate).
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Mock simple delegate — mirrors DashMediaDelegate.
|
||||
* Mock simple delegate — mirrors DashMediaBase.
|
||||
*
|
||||
* Exercises: minimal delegate with just src (read-write) and engine (readonly).
|
||||
* No JSDoc on properties — tests that missing descriptions produce undefined.
|
||||
|
||||
Reference in New Issue
Block a user