Asynchronously retrieve the capabilities of a given media stream track.
This function attempts to fetch the capabilities of a MediaStreamTrack. If called too early, it
may return an empty object as the capabilities might not be available
immediately.
Because capabilities are allowed to be an empty object, a timeout mechanism is implemented to
ensure the function returns even if capabilities are not obtained within the specified time,
preventing indefinite waiting.
Parameters
track: MediaStreamTrack
The MediaStreamTrack whose capabilities are to be fetched.
timeout: number = GET_CAPABILITIES_TIMEOUT
The maximum time (in milliseconds) to wait for fetching capabilities.
Returns Promise<MediaTrackCapabilities>
A promise that resolves to the track's capabilities, which may be an empty object.
Asynchronously retrieve the capabilities of a given media stream track.
This function attempts to fetch the capabilities of a MediaStreamTrack. If called too early, it may return an empty object as the capabilities might not be available immediately. Because capabilities are allowed to be an empty object, a timeout mechanism is implemented to ensure the function returns even if capabilities are not obtained within the specified time, preventing indefinite waiting.