0

我正在尝试将 Zoom SDK 会议集成到 Android 应用程序中。我在使用自定义会议 ui 和学习如何使用 Zoom 的视频视图(称为MobileRTCVideoView. 这是我要创建的界面:

具有最小化用户视频视图和共享视图的自定义会议 UI

我试过的:

但是,我仍然不明白如何实现它,非常感谢一些关于如何使用的解释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>
4

1 回答 1

0

我可以给出的可靠建议是:

  1. 覆盖或重用他们现有的 Sample 以开始使用。(虽然他们的示例应用看起来像是匆忙完成的)
  2. 不要使用他们的样式,覆盖他们的样式并使用它们。
  3. 扫描/研究 MyMeetingActivity。大部分繁重的工作已经在其中完成了。
  4. 检查他们的两个样本。如果你无法从 MyMeetingActivity 中找出 sharedView,那么看起来你还没有认真学习

在过去的几周里,我在这方面做了很多工作。自定义 UI 运行良好。我正在寻找画廊视图。我们有很多我们添加和重用的特性和功能。总而言之,这是一次颠簸的旅程,但当我花时间在上面时,它仍然很顺利。

我不明白为什么这个问题还没有回答。不幸的是,我太忙了,无法真正为您编写代码,尤其是因为我什至没有使用 Kotlin 进行开发。对不起。希望你想清楚。如果我实现了画廊视图,那么也许我可以回来给你一些指示。祝你好运

于 2020-12-15T22:21:57.640 回答