|
@@ -56,6 +56,8 @@ class MeetingPageState extends State<MeetingPage> with WidgetsBindingObserver {
|
|
|
int? meetId;
|
|
|
int quality = TRTCCloudDef.TRTC_AUDIO_QUALITY_DEFAULT;
|
|
|
|
|
|
+ Offset _offset = Offset(0, 0);
|
|
|
+
|
|
|
late ScrollController scrollControl;
|
|
|
@override
|
|
|
initState() {
|
|
@@ -497,7 +499,18 @@ class MeetingPageState extends State<MeetingPage> with WidgetsBindingObserver {
|
|
|
},
|
|
|
child: TRTCCloudVideoView(
|
|
|
key: valueKey,
|
|
|
+
|
|
|
+ /// 视图类型:[TRTC_VideoView_TextureView]/[TRTC_VideoView_SurfaceView]
|
|
|
+ /// 使用 TRTC_VideoView_TextureView 模式的话不会触发 onViewCreated 回调
|
|
|
+ /// 使用 TRTC_VideoView_SurfaceView 模式的话会触发 onViewCreated 回调,此模式为平台视图,不支持自定义渲染
|
|
|
+ /// iOS 不支持 TRTC_VideoView_SurfaceView
|
|
|
+ /// Windows 和 macOS 只支持 TRTC_VideoView_TextureView
|
|
|
viewType: TRTCCloudDef.TRTC_VideoView_Texture,
|
|
|
+
|
|
|
+ /// 视图模式:[TRTC_VideoView_Model_Virtual]/[TRTC_VideoView_Model_Hybrid]
|
|
|
+ /// 使用 TRTC_VideoView_Model_Virtual 虚拟渲染模式使用的是 AndroidView
|
|
|
+ /// 使用 TRTC_VideoView_Model_Hybrid 混合渲染模式使用的是 PlatformViewLink 【会闪退,不推荐使用】
|
|
|
+ viewMode: TRTCCloudDef.TRTC_VideoView_Model_Virtual,
|
|
|
// This parameter is required for rendering desktop.(Android/iOS/web no need)
|
|
|
textureParam: CustomRender(
|
|
|
userId: item['userId'],
|
|
@@ -507,11 +520,13 @@ class MeetingPageState extends State<MeetingPage> with WidgetsBindingObserver {
|
|
|
: TRTCCloudDef.TRTC_VIDEO_STREAM_TYPE_SUB,
|
|
|
width: 1080,
|
|
|
height: 1920,
|
|
|
+ //// TOTODODO 加一个渲染条件字段 :副窗口
|
|
|
+ isSubVideo: false,
|
|
|
),
|
|
|
onViewCreated: (viewId) async {
|
|
|
print('🚀 视图创建完成 viewId: $viewId');
|
|
|
if (item['userId'] == userInfo['userId']) {
|
|
|
- print('🚀 通知 Android native 创建本地预览的 Texture 通道');
|
|
|
+ print('🚀 通知 native 创建本地预览的 Texture 通道');
|
|
|
await trtcCloud.startLocalPreview(isFrontCamera, viewId);
|
|
|
setState(() {
|
|
|
localViewId = viewId;
|
|
@@ -523,7 +538,7 @@ class MeetingPageState extends State<MeetingPage> with WidgetsBindingObserver {
|
|
|
? TRTCCloudDef.TRTC_VIDEO_STREAM_TYPE_BIG
|
|
|
: TRTCCloudDef.TRTC_VIDEO_STREAM_TYPE_SUB,
|
|
|
viewId);
|
|
|
- print('🚀 通知 Android native 创建远程视频的 Texture 通道');
|
|
|
+ print('🚀 通知 native 创建远程视频的 Texture 通道');
|
|
|
print('🚀 远程用户ID: ${item['userId']}');
|
|
|
print('🚀 远程视频流类型: ${item['type']}');
|
|
|
}
|