---
title: MediaStreamTrack.id
slug: Web/API/MediaStreamTrack/id
tags:
  - Media Capture and Streams
  - MediaStreamTrack
  - Property
  - Read-only
  - Reference
  - WebRTC
browser-compat: api.MediaStreamTrack.id
---
{{APIRef("Media Capture and Streams")}}

The **`MediaStreamTrack.id`** read-only property returns a
{{domxref("DOMString")}} containing a unique identifier (GUID) for the track, which is
generated by the {{glossary("user agent")}}.

## Syntax

```js
const id = track.id
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- [WebRTC](/en-US/docs/Web/API/WebRTC_API)
