Back to Content

HTMLMediaElement: remote property

files/en-us/web/api/htmlmediaelement/remote/index.md

latest655 B
Original Source

{{APIRef("Remote Playback API")}}

The remote read-only property of the {{domxref("HTMLMediaElement")}} interface returns the {{domxref("RemotePlayback")}} object associated with the media element. The RemotePlayback object allow the control of remote devices playing the media.

Value

A {{domxref("RemotePlayback")}} object associated with the media element.

Example

js
const el = document.createElement("audio");
const remotePlayback = el.remote;

remotePlayback.watchAvailability((availability) => {
  // Do something when the availability changes
});

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}