Skip to main content

getDeviceId

function getDeviceId(device, separator): string;

Create a device ID from provided device. The device ID here is in the format of deviceId:kind, be default.

Parameters

ParameterTypeDefault valueDescription
devicePick<MediaDeviceInfoLike, "deviceId" | "kind">undefinedThe device to create the ID from
separatorstringDEVICE_ID_SEPARATORThe separator to use to join the device ID

Returns

string