When passing a data object to the VideoPlayer, muxPlaybackId (or playbackId) is required, but not indicated as such in the type:
export type Video = {
/** Title attribute (`title`) for the video */
title?: Possibly<string>;
/** The height of the video */
height?: Possibly<number>;
/** The width of the video */
width?: Possibly<number>;
/** The MUX playbaack ID */
muxPlaybackId?: Possibly<string>;
/** The MUX playbaack ID */
playbackId?: Possibly<string>;
/** A data: URI containing a blurhash for the video */
blurUpThumb?: Possibly<string>;
/** Other data can be passed, but they have no effect on rendering the player */
// biome-ignore lint/suspicious/noExplicitAny: we intentionally want to allow to add any other value to this video object
[k: string]: any;
};
As such, it causes situations where a missing ID can cause the player to appear as though it has a loading issue (the bottom player in this case), showing a loading spinner forever:
Should we do any of the following:
- Mark at least one of the playback ID parameters as required in the TypeScript
- Optionally also accept, and check for,
streamingUrl as a fallback and extract the ID from there
- If no ID is present in either the param or a fallback, how a visual error (like a
div overlay) instead of trying to actually load the video
When passing a
dataobject to the VideoPlayer,muxPlaybackId(orplaybackId) is required, but not indicated as such in the type:As such, it causes situations where a missing ID can cause the player to appear as though it has a loading issue (the bottom player in this case), showing a loading spinner forever:
Should we do any of the following:
streamingUrlas a fallback and extract the ID from theredivoverlay) instead of trying to actually load the video