srcObject property

  1. @override
MediaStream? get srcObject
override

Implementation

@override
MediaStream? get srcObject => _srcObject;
  1. @override
set srcObject (MediaStream? stream)
override

Implementation

@override
set srcObject(MediaStream? stream) {
  if (textureId == null) throw 'Call initialize before setting the stream';

  _srcObject = stream;
  WebRTC.invokeMethod('videoRendererSetSrcObject', <String, dynamic>{
    'textureId': textureId,
    'streamId': stream?.id ?? '',
    'ownerTag': stream?.ownerTag ?? ''
  }).then((_) {
    value = (stream == null)
        ? RTCVideoValue.empty
        : value.copyWith(renderVideo: renderVideo);
  });
}