NERtcVideoView constructor

  1. @Deprecated('use NERtcVideoView.withInternalRenderer instead')
const NERtcVideoView({
  1. Key? key,
  2. int? uid,
  3. bool subStream = false,
  4. bool autoAttach = true,
  5. ValueListenable<bool>? mirrorListenable,
  6. NERtcVideoRenderer? renderer,
  7. NERtcVideoRendererEventListener? rendererEventLister,
  8. NERtcVideoViewFitType fitType = NERtcVideoViewFitType.cover,
  9. WidgetBuilder? placeholderBuilder,
  10. Color backgroundColor = const Color(0xFF292933),
})

创建用户视频渲染组件。

renderer 为视频渲染所需的画布对象,可空。

  • 如果不为空,组件不会自动销毁 renderer,需要开发者在合适的时机调用 renderer.dispose() 销毁,否则可能会造成内存泄漏。
  • 如果为空,组件内部会自动创建并销毁 renderer,不会造成内存泄漏。推荐使用该模式创建视频渲染组件。

Implementation

@Deprecated('use NERtcVideoView.withInternalRenderer instead')
const NERtcVideoView({
  Key? key,
  this.uid,
  this.subStream = false,
  this.autoAttach = true,
  this.mirrorListenable,
  this.renderer,
  this.rendererEventLister,
  this.fitType = NERtcVideoViewFitType.cover,
  this.placeholderBuilder,
  this.backgroundColor = const Color(0xFF292933),
})  : assert(renderer != null || autoAttach),
      super(key: key);