mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 03:13:51 +02:00
Add CMAF format and CMAF/init segment support to HLS muxer
This commit is contained in:
@@ -1150,3 +1150,11 @@ export const rejectAfter = (ms: number, message = 'Promise rejected') => {
|
||||
setTimeout(() => reject(new Error(message)), ms);
|
||||
});
|
||||
};
|
||||
|
||||
export const toArray = <T>(x: T | T[]) => {
|
||||
if (Array.isArray(x)) {
|
||||
return x;
|
||||
} else {
|
||||
return [x];
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user