Firefox Tomorrow

web api instance property

MediaStream: id property

View on MDN ↗

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

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also