srcObject property
The srcObject property of the
HTMLMediaElement interface sets or returns the object which serves as
the source of the media associated with the HTMLMediaElement.
The object can be a MediaStream, a MediaSource, a
Blob, or a File (which inherits from Blob).
Note: As of March 2020, only Safari has full support for
srcObject, i.e. usingMediaSource,MediaStream,Blob, andFileobjects as values. Other browsers supportMediaStreamobjects; until they catch up, consider falling back to creating a URL withURL.createObjectURL_staticand assigning it to HTMLMediaElement.src (see below for an example). In addition, as of version 108 Chromium supports attaching a dedicated workerMediaSourceobject by assigning that object's MediaSourceHandle instance (transferred from the worker) tosrcObject.
Implementation
external MediaProvider? get srcObject;
Implementation
external set srcObject(MediaProvider? value);