NERtcVideoView constructor
- @Deprecated('use NERtcVideoView.withInternalRenderer instead')
- Key? key,
- int? uid,
- bool subStream = false,
- bool autoAttach = true,
- ValueListenable<
bool> ? mirrorListenable, - NERtcVideoRenderer? renderer,
- NERtcVideoRendererEventListener? rendererEventLister,
- NERtcVideoViewFitType fitType = NERtcVideoViewFitType.cover,
- WidgetBuilder? placeholderBuilder,
- 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);