srcObject property
The stream this renderer draws. Setting it rebinds the view; setting it to null leaves the view blank.
Implementation
@override
NativeMediaStream? get srcObject => _srcObject;
Implementation
@override
set srcObject(NativeMediaStream? stream) {
final before = rendererTarget(this);
_srcObject = stream;
// A pre-call preview: the app made a track with
// `VideoSDK.createCameraVideoTrack()` and handed us its stream. The native
// side knows that track by id.
final video = stream?.getVideoTracks();
_trackId = (video == null || video.isEmpty) ? null : video.first.id;
if (_trackId != null) {
_participantId = null;
_kind = null;
}
_resetSizeIfRetargeted(before);
_markRenderable(stream != null);
}