rtc_render_view: RtcSurfaceView
RtcSurfaceView class for rendering local and remote video.
class RtcSurfaceView extends StatefulWidget { final int uid; final String? channelId; final VideoRenderMode renderMode; final VideoMirrorMode mirrorMode; final bool zOrderOnTop; final bool zOrderMediaOverlay; final PlatformViewCreatedCallback? onPlatformViewCreated; final Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers; final bool subProcess; const RtcSurfaceView({ Key? key, required this.uid, this.channelId, this.renderMode = VideoRenderMode.Hidden, this.mirrorMode = VideoMirrorMode.Auto, this.zOrderOnTop = false, this.zOrderMediaOverlay = false, this.onPlatformViewCreated, this.gestureRecognizers, this.subProcess = false, }) : super(key: key); @override State<StatefulWidget> createState() { return _RtcSurfaceViewState(); } }
This class has the following corresponding classes:
- Android: SurfaceView.
- iOS: UIView
- Applies to the macOS and Windows platforms only.
Parameters
- uid
- The user ID.
- channelId
-
The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:
- The 26 lowercase English letters: a to z.
- The 26 uppercase English letters: A to Z.
- The 10 numeric characters: 0 to 9.
- Space
- "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
- renderMode
- The rendering mode of the video. See VideoRenderMode.
- mirrorMode
- The mirror mode of the view. See VideoMirrorMode.
- zOrderOnTop
-
Whether to place the current screen on another layer of the
current window.
Note: This method is for Android only.
- zOrderMediaOverlay
-
Whether to place the surface layer of the SurfaceView view on
top of another SurfaceView in the window (but still below the
window).
Note: This method is for Android only.
- onPlatformViewCreated
- This event is triggered when a platform view is created.
- gestureRecognizers
- The Gesture object.
- subProcess
- Whether to create a subprocess.
rtc_render_view: RtcSurfaceView
Constructor of the RtcSurfaceView class.
const RtcSurfaceView({ Key? key, required this.uid, this.channelId, this.renderMode = VideoRenderMode.Hidden, this.mirrorMode = VideoMirrorMode.Auto, this.zOrderOnTop = false, this.zOrderMediaOverlay = false, this.onPlatformViewCreated, this.gestureRecognizers, this.subProcess = false, }) : super(key: key);
Parameters
- key
- Specifiers of Widget, Element, and SemanticsNode. For details, see Flutter's official documentation for a description of the key object.
- uid
- The user ID.
- channelId
-
The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:
- The 26 lowercase English letters: a to z.
- The 26 uppercase English letters: A to Z.
- The 10 numeric characters: 0 to 9.
- Space
- "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
- renderMode
- The rendering mode of the video. See VideoRenderMode.
- mirrorMode
- The mirror mode of the view. See VideoMirrorMode.
- zOrderOnTop
-
Whether to place the current screen on another layer of the
current window.
Note: This method is for Android only.
- zOrderMediaOverlay
-
Whether to place the surface layer of the SurfaceView view
on top of another SurfaceView in the window (but still below
the window).
Note: This method is for Android only.
- onPlatformViewCreated
- This event is triggered when a platform view is created.
- gestureRecognizers
- The Gesture object.
- subProcess
- Whether to create a subprocess.