@videts/vide / vast / selectMediaFile
Function: selectMediaFile()
selectMediaFile(
files,hints?): {mimeType:string;url:string; } |null
Defined in: vast/media.ts:76
Select the best media file using a multi-factor scoring algorithm.
Scoring priority: MIME type > resolution fit > bitrate > delivery method. Pass optional hints for context-aware selection (player size, bandwidth cap). Without hints, behavior is equivalent to the classic mp4-prefer + highest-bitrate logic.
Parameters
| Parameter | Type |
|---|---|
files | VastMediaFile[] |
hints? | MediaSelectionHints |
Returns
{ mimeType: string; url: string; } | null