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
+1 -15
View File
@@ -6,7 +6,6 @@ import {
DEFAULT_DASH_SOURCE,
DEFAULT_SOURCE,
MP4_SOURCE_IDS,
MUX_SOURCE_IDS,
NON_DASH_SOURCE_IDS,
SOURCES,
} from '@app/shared/sources';
@@ -78,13 +77,6 @@ export function App() {
}
}, [preset, source, setSource]);
// Constrain source to Mux playbackId sources when switching to mux-video / mux-audio
useEffect(() => {
if ((preset === 'mux-video' || preset === 'mux-audio') && !SOURCES[source].playbackId) {
setSource(DEFAULT_SOURCE);
}
}, [preset, source, setSource]);
// CDN and background video do not have a Tailwind skin variant.
useEffect(() => {
if ((platform === 'cdn' || preset === 'background-video') && styling === 'tailwind') {
@@ -93,13 +85,7 @@ export function App() {
}, [platform, preset, styling]);
const availableSources =
preset === 'audio'
? MP4_SOURCE_IDS
: preset === 'dash-video'
? DASH_SOURCE_IDS
: preset === 'mux-video' || preset === 'mux-audio'
? MUX_SOURCE_IDS
: NON_DASH_SOURCE_IDS;
preset === 'audio' ? MP4_SOURCE_IDS : preset === 'dash-video' ? DASH_SOURCE_IDS : NON_DASH_SOURCE_IDS;
const handleSourceChange = useCallback((value: string) => setSource(value as SourceId), [setSource]);