refactor(packages)!: replace DelegateMixin & ProxyMixin with MediaHost base classes (#1292)

This commit is contained in:
Wesley Luyten
2026-04-14 00:18:11 -05:00
committed by GitHub
parent f609373cd7
commit 8f1653efcd
91 changed files with 2840 additions and 1816 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import type { MediaApi } from '@videojs/core/dom';
import type { Media } from '@videojs/core';
type AnyClass = abstract new (...args: any[]) => any;
@@ -13,7 +13,7 @@ function getSettableProps(DelegateClass: AnyClass): Set<string> {
return props;
}
export function mediaProps(media: MediaApi, DelegateClass: AnyClass, props: Record<string, any>) {
export function mediaProps(media: Media, DelegateClass: AnyClass, props: Record<string, any>) {
const delegateKeys = getSettableProps(DelegateClass);
const rest: Record<string, any> = {};
@@ -1,6 +1,6 @@
'use client';
import type { Media } from '@videojs/core/dom';
import type { Media } from '@videojs/core';
import { useState } from 'react';
import { useMediaAttach } from '../player/context';