NERtcVideoView.withInternalRenderer constructor

const NERtcVideoView.withInternalRenderer({
  1. Key? key,
  2. String? channelTag,
  3. int? uid,
  4. bool subStream = false,
  5. ValueListenable<bool>? mirrorListenable,
  6. NERtcVideoRendererEventListener? rendererEventLister,
  7. NERtcVideoViewFitType fitType = NERtcVideoViewFitType.cover,
  8. WidgetBuilder? placeholderBuilder,
  9. Color backgroundColor = const Color(0xFF292933),
  10. String? streamId,
})

创建用户视频渲染组件。

在该模式下渲染所需的画布对象不需要外部传入,组件内部在使用时会自动创建,不再使用时会自动销毁,不会造成内存泄漏。 推荐使用该模式创建视频渲染组件。

Implementation

const NERtcVideoView.withInternalRenderer({
  Key? key,
  this.channelTag,
  this.uid,
  this.subStream = false,
  this.mirrorListenable,
  this.rendererEventLister,
  this.fitType = NERtcVideoViewFitType.cover,
  this.placeholderBuilder,
  this.backgroundColor = const Color(0xFF292933),
  this.streamId,
})  : renderer = null,
      autoAttach = true,
      super(key: key);