setFile(path, [videoStream], [audioStream], [subtitleStream])
Class: MediaPlayer.
Description:
Sets a path of a local media file as a new media source. Resets player and overrides previously set source.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
|
|
string |
Path to media file. |
|
|
|
number |
0 |
If the media file has more than one video stream, specify which one to use. Default is 0. For audio-only files this is ignored. |
|
|
number |
0 |
If the media file has more than one audio stream (such as multiple languages), specify which one to use. Default is 0. For media without audio stream this is ignored. |
|
|
number | string | null |
null |
Index of a subtitle stream or a subtitles file path. Default is |
Returns:
Returns this component instance.
Type: MediaPlayer
