feat: add native hls media + refactor (#1154)

This commit is contained in:
Wesley Luyten
2026-03-30 20:13:19 -05:00
committed by GitHub
parent 0433722ee4
commit 1b2afc6e41
24 changed files with 552 additions and 200 deletions
@@ -0,0 +1,22 @@
const hasOwn = Object.prototype.hasOwnProperty;
export function shallowEqual<T>(a: T, b: T): boolean {
if (Object.is(a, b)) return true;
if (typeof a !== 'object' || a === null || typeof b !== 'object' || b === null) {
return false;
}
const keysA = Object.keys(a);
const keysB = Object.keys(b);
if (keysA.length !== keysB.length) return false;
for (const key of keysA) {
if (!hasOwn.call(b, key) || !Object.is((a as Record<string, unknown>)[key], (b as Record<string, unknown>)[key])) {
return false;
}
}
return true;
}