disableVideoTrack
Description
Disable the current video track, if one.
Might enter in RELOADING
state for a short period after calling this API.
Note for multi-Period contents:
This method will only have an effect on the Period that is currently playing.
If you want to disable the video track for other Periods as well, you might want
to call setPreferredVideoTracks instead. With
this method, you can globally apply a null
video track preference - which means
that you would prefer having no video track - by setting its second argument to
true
.
More information can be found on that API’s documentation.
This option may have no effect in DirectFile mode (see loadVideo options).
The directfile mode is a special case here because when in it, the RxPlayer depends for track selection on the corresponding HTML standard as implemented by the different browsers.
Though this standard says nothing about not being able to disable the video track (or to stay more in line with their terms: to not select any video track), no browser implementation actually seem to be able to do it, even when the corresponding browser APIs show that no video track is currently selected. This might be a bug on their parts.
Due to this fact, we do not recommend using this API in directfile mode for now. You might even receive a reassuring `videoTrackChange` event (with a `null` payload) while the video track is still actually active.
The directfile mode is a special case here because when in it, the RxPlayer depends for track selection on the corresponding HTML standard as implemented by the different browsers.
Though this standard says nothing about not being able to disable the video track (or to stay more in line with their terms: to not select any video track), no browser implementation actually seem to be able to do it, even when the corresponding browser APIs show that no video track is currently selected. This might be a bug on their parts.
Due to this fact, we do not recommend using this API in directfile mode for now. You might even receive a reassuring `videoTrackChange` event (with a `null` payload) while the video track is still actually active.
Syntax
player.disableVideoTrack();