setMediaElementSinkId
setMediaElementSinkId
ConstsetMediaElementSinkId(el,deviceId):Promise<undefined>
Assigns the specified audio output device to the specified HTMLMediaElement. The device with id deviceId must be an audio output device. Asynchronously returns whether the operation succeeded.
Some browsers do not support output device selection. You can check by calling supportsMediaOutput.
Parameters
el
Target element.
deviceId
Id of the audio output device.
Returns
Promise<undefined>