Resolve the lazy MediaBase.objectURL promise into a string
suitable for direct use in <audio src> / <img src> /
<video src> / <a href download>. Returns undefined until the
URL is available.
Lifecycle:
media changes) the hook awaits
media.objectURL, then commits the resolved string to state.media changes) the hook calls
media.revoke() to free the object URL slot. The next consumer
that accesses media.objectURL mints a fresh URL from the same
Blob, so live re-renders just work.useMediaURL stays at undefined. Inspect
media.error to surface the failure.Pair with useAudio / useImages / useVideo /
useFiles to bridge SDK media handles into React DOM nodes
without manual URL.createObjectURL bookkeeping.
useMediaURL(media: MediaBase | undefined): string | undefined| Name | Type | Description |
|---|---|---|
media* | MediaBase | undefined |