MDN self-hosted library · e01.org

MediaStream: id property

Media Capture and Streams

Open notebook · 1 cells web-api-instance-property upstream source

Media Capture and Streams

The id read-only property of the MediaStream interface is a string containing 36 characters denoting a unique identifier (GUID) for the object.

Value

A string.

Examples

const promise = navigator.mediaDevices.getUserMedia({
  audio: true,
  video: true,
});

promise.then((stream) => {
  console.log(stream.id);
});

Specifications

Browser compatibility

See also

  • MediaStream, the interface this property belongs to.