diff --git a/README.md b/README.md index c03e1be..04141d5 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ let AppKey: String = <#AppKey#> ``` - 将注册的AppKey填入其中。 - 在终端cd到podfile所在的文件目录,复制代理到终端,执行`pod install`命令,等待成功后点击运行即可。 -- 将用户名以及token复制粘贴填写在输入框中->然后点击登录->选择呼叫类型->输入呼叫用户的userId->点击呼叫。 +- 将用户Id以及token复制粘贴填写在`PublicDefines.swift`中即可。注意需要安装两个设备两个用户登录测试 - 若需发起群组通话,才需要[创建群组](https://v2-console.easemob.com/app/operation/management/micro/app/im-service/operative-service/group),将已创建用户加入群组见下图,让其中一两个用户登录后,将群组id复制到输入框中点击呼叫即可。 ![](./DocumentationImages/joinGroup.png) diff --git a/Sources/EaseCallUIKit/Classes/UI/Controllers/CallMultiViewController.swift b/Sources/EaseCallUIKit/Classes/UI/Controllers/CallMultiViewController.swift index 6699dce..e397ef6 100644 --- a/Sources/EaseCallUIKit/Classes/UI/Controllers/CallMultiViewController.swift +++ b/Sources/EaseCallUIKit/Classes/UI/Controllers/CallMultiViewController.swift @@ -79,23 +79,23 @@ open class CallMultiViewController: UIViewController { self.addCallTimer() } self.view.addSubViews([self.background, self.navigationBar,self.bottomView,self.callView]) -// if let call = CallKitManager.shared.callInfo, (call.state == .answering || call.state == .dialing) { -// self.callView.updateWithItems() -// } self.bottomView.updateButtonSelectedStatus(selectedIndex: 3) self.callView.isHidden = !state // Do any additional setup after loading the view. self.setupNavigationState() if let groupId = CallKitManager.shared.callInfo?.groupId, !groupId.isEmpty { let groupName = CallKitManager.shared.callInfo?.groupName ?? groupId + var avatarURL = CallKitManager.shared.callInfo?.groupAvatar ?? "" var showName = groupName if let chatGroup = ChatGroup(id: groupId) { if !chatGroup.groupName.isEmpty { showName = chatGroup.groupName - let avatarURL = CallKitManager.shared.callInfo?.groupAvatar ?? chatGroup.groupAvatar - self.navigationBar.avatarURL = avatarURL + if avatarURL.isEmpty { + avatarURL = chatGroup.groupAvatar + } } } + self.navigationBar.avatarURL = avatarURL self.navigationBar.title = showName } self.navigationBar.clickClosure = { [weak self] in diff --git a/Sources/EaseCallUIKit/Classes/UI/Controllers/MultiCallParticipantsController.swift b/Sources/EaseCallUIKit/Classes/UI/Controllers/MultiCallParticipantsController.swift index b7251bc..a15b9c5 100644 --- a/Sources/EaseCallUIKit/Classes/UI/Controllers/MultiCallParticipantsController.swift +++ b/Sources/EaseCallUIKit/Classes/UI/Controllers/MultiCallParticipantsController.swift @@ -78,7 +78,9 @@ import UIKit Task { let profiles = await CallKitManager.shared.profileProvider?.fetchGroupProfiles(profileIds: [groupId]) if let profile = profiles?.first { - if let group = ChatGroup(id: self.groupId) { + self.groupName = profile.nickname + self.groupAvatar = profile.avatarURL + if let group = ChatGroup(id: self.groupId),self.groupName.isEmpty,self.groupAvatar.isEmpty { self.groupName = profile.nickname self.groupAvatar = profile.avatarURL } @@ -89,7 +91,9 @@ import UIKit CallKitManager.shared.profileProviderOC?.fetchGroupProfiles(profileIds: [groupId]) { [weak self] profiles in guard let `self` = self else { return } if let profile = profiles.first { - if let group = ChatGroup(id: self.groupId) { + self.groupName = profile.nickname + self.groupAvatar = profile.avatarURL + if let group = ChatGroup(id: self.groupId),self.groupName.isEmpty,self.groupAvatar.isEmpty { self.groupName = profile.nickname self.groupAvatar = profile.avatarURL }