我正在尝试将 Zoom SDK 会议集成到 Android 应用程序中。我在使用自定义会议 ui 和学习如何使用 Zoom 的视频视图(称为MobileRTCVideoView
. 这是我要创建的界面:
我试过的:
但是,我仍然不明白如何实现它,非常感谢一些关于如何使用的解释MobileRTCVideoView
,并实现图像上所示的会议 ui。会议一次最多只能举行两个用户。
我使用 API Key 和 Secret 初始化 Zoom SDK,并使用电子邮件登录。我启用了自定义会议 ui:
zoomSDK!!.meetingSettingsHelper.isCustomizedMeetingUIEnabled=true
我开始一个即时会议:
val meetingService=zoomSDK!!.meetingService
val opts=InstantMeetingOptions()
opts.no_driving_mode = true
opts.no_invite = false
opts.no_meeting_end_message = false
opts.no_titlebar = false
opts.no_bottom_toolbar = false
opts.no_dial_in_via_phone = true
opts.no_dial_out_to_phone = true
opts.no_disconnect_audio = true
meetingService.startInstantMeeting(this,opts)
我试图通过为自定义会议创建另一个活动来遵循示例应用程序,但显然类和代码不完整:
class CustomMeetingActivity: FragmentActivity() {
private var zoomSDK:ZoomSDK?=null
private var inflater:LayoutInflater?=null
private var normal_view:View?=null
private var video_view:MobileRTCVideoView?=null
private var video_manager:MobileRTCVideoViewManager?=null
private var meeting_service:MeetingService?=null
private var in_meeting_service:InMeetingService?=null
private var share_view:MobileRTCShareView?=null
private var meeting_video_view:FrameLayout?=null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
zoomSDK=ZoomSDK.getInstance()
meeting_service = ZoomSDK.getInstance().meetingService
in_meeting_service=ZoomSDK.getInstance().inMeetingService
if(meeting_service==null || in_meeting_service==null){finish();return}
setContentView(R.layout.custom_meeting_layout)
inflater=layoutInflater;
normal_view = inflater!!.inflate(R.layout.meeting_content_normal,null)
meeting_video_view = findViewById<View>(R.id.meetingVideoView) as FrameLayout
share_view = findViewById<View>(R.id.sharingView) as MobileRTCShareView
video_view=normal_view!!.findViewById(R.id.videoView) as MobileRTCVideoView
}
}
在清单中添加了活动:
<activity
android:name="com.mypackage.appname.CustomMeetingActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/ZMTheme.SubWindow">
</activity>