Fix bug
This commit is contained in:
parent
bb49d6b27a
commit
b53d4dfcfd
@ -1,3 +1,7 @@
|
|||||||
|
## 2.3.4+1
|
||||||
|
|
||||||
|
- Add signalingGetTokenByRoomID method for SignalingManager
|
||||||
|
|
||||||
## 2.3.4
|
## 2.3.4
|
||||||
|
|
||||||
- Fix bug
|
- Fix bug
|
||||||
|
@ -60,4 +60,11 @@ public class SignalingManager extends BaseManager {
|
|||||||
value(methodCall, "operationID"),
|
value(methodCall, "operationID"),
|
||||||
value(methodCall, "groupID"));
|
value(methodCall, "groupID"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void signalingGetTokenByRoomID(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.signalingGetTokenByRoomID(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "roomID"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,6 +117,24 @@ class SignalingManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toObj(value, (map) => RoomCallingInfo.fromJson(map)));
|
Utils.toObj(value, (map) => RoomCallingInfo.fromJson(map)));
|
||||||
|
|
||||||
|
/// 获取进入房间的信息
|
||||||
|
/// [roomID] 当前房间ID
|
||||||
|
Future<SignalingCertificate> signalingGetTokenByRoomID({
|
||||||
|
required String roomID,
|
||||||
|
String? operationID,
|
||||||
|
}) =>
|
||||||
|
_channel
|
||||||
|
.invokeMethod(
|
||||||
|
'signalingGetTokenByRoomID',
|
||||||
|
_buildParam({
|
||||||
|
'roomID': roomID,
|
||||||
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
|
}))
|
||||||
|
.then((value) => Utils.toObj(
|
||||||
|
value,
|
||||||
|
(map) => SignalingCertificate.fromJson(
|
||||||
|
map..addAll({'roomID': roomID}))));
|
||||||
|
|
||||||
static Map _buildParam(Map param) {
|
static Map _buildParam(Map param) {
|
||||||
param["ManagerName"] = "signalingManager";
|
param["ManagerName"] = "signalingManager";
|
||||||
return param;
|
return param;
|
||||||
|
@ -65,16 +65,15 @@ class InvitationInfo {
|
|||||||
/// 平台[Platform]
|
/// 平台[Platform]
|
||||||
int? platformID;
|
int? platformID;
|
||||||
|
|
||||||
InvitationInfo(
|
InvitationInfo({this.inviterUserID,
|
||||||
{this.inviterUserID,
|
this.inviteeUserIDList,
|
||||||
this.inviteeUserIDList,
|
this.groupID,
|
||||||
this.groupID,
|
this.roomID,
|
||||||
this.roomID,
|
this.timeout,
|
||||||
this.timeout,
|
this.initiateTime,
|
||||||
this.initiateTime,
|
this.mediaType,
|
||||||
this.mediaType,
|
this.sessionType,
|
||||||
this.sessionType,
|
this.platformID});
|
||||||
this.platformID});
|
|
||||||
|
|
||||||
InvitationInfo.fromJson(Map<String, dynamic> json) {
|
InvitationInfo.fromJson(Map<String, dynamic> json) {
|
||||||
inviterUserID = json['inviterUserID'];
|
inviterUserID = json['inviterUserID'];
|
||||||
@ -128,7 +127,9 @@ class SignalingCertificate {
|
|||||||
token = json['token'];
|
token = json['token'];
|
||||||
roomID = json['roomID'];
|
roomID = json['roomID'];
|
||||||
liveURL = json['liveURL'];
|
liveURL = json['liveURL'];
|
||||||
busyLineUserIDList = json['busyLineUserIDList'];
|
busyLineUserIDList =
|
||||||
|
null == json['busyLineUserIDList'] ? null : json['busyLineUserIDList'].cast<
|
||||||
|
String>();
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@ -144,16 +145,16 @@ class SignalingCertificate {
|
|||||||
class RoomCallingInfo {
|
class RoomCallingInfo {
|
||||||
InvitationInfo? invitation;
|
InvitationInfo? invitation;
|
||||||
List<Participant>? participant;
|
List<Participant>? participant;
|
||||||
String? token;
|
|
||||||
String? roomID;
|
String? roomID;
|
||||||
|
String? token;
|
||||||
String? liveURL;
|
String? liveURL;
|
||||||
String? groupID;
|
String? groupID;
|
||||||
|
|
||||||
RoomCallingInfo({
|
RoomCallingInfo({
|
||||||
this.invitation,
|
this.invitation,
|
||||||
this.participant,
|
this.participant,
|
||||||
this.token,
|
|
||||||
this.roomID,
|
this.roomID,
|
||||||
|
this.token,
|
||||||
this.liveURL,
|
this.liveURL,
|
||||||
this.groupID,
|
this.groupID,
|
||||||
});
|
});
|
||||||
@ -168,8 +169,8 @@ class RoomCallingInfo {
|
|||||||
participant!.add(Participant.fromJson(v));
|
participant!.add(Participant.fromJson(v));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
token = json['token'];
|
|
||||||
roomID = json['roomID'] ?? invitation?.roomID;
|
roomID = json['roomID'] ?? invitation?.roomID;
|
||||||
|
token = json['token'];
|
||||||
liveURL = json['liveURL'];
|
liveURL = json['liveURL'];
|
||||||
groupID = json['groupID'];
|
groupID = json['groupID'];
|
||||||
}
|
}
|
||||||
@ -182,8 +183,8 @@ class RoomCallingInfo {
|
|||||||
if (this.participant != null) {
|
if (this.participant != null) {
|
||||||
data['participant'] = this.participant!.map((v) => v.toJson()).toList();
|
data['participant'] = this.participant!.map((v) => v.toJson()).toList();
|
||||||
}
|
}
|
||||||
data['token'] = this.token;
|
|
||||||
data['roomID'] = this.roomID;
|
data['roomID'] = this.roomID;
|
||||||
|
data['token'] = this.token;
|
||||||
data['liveURL'] = this.liveURL;
|
data['liveURL'] = this.liveURL;
|
||||||
data['groupID'] = this.groupID;
|
data['groupID'] = this.groupID;
|
||||||
return data;
|
return data;
|
||||||
@ -205,7 +206,7 @@ class Participant {
|
|||||||
? GroupMembersInfo.fromJson(json['groupMemberInfo'])
|
? GroupMembersInfo.fromJson(json['groupMemberInfo'])
|
||||||
: null;
|
: null;
|
||||||
userInfo =
|
userInfo =
|
||||||
json['userInfo'] != null ? UserInfo.fromJson(json['userInfo']) : null;
|
json['userInfo'] != null ? UserInfo.fromJson(json['userInfo']) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: flutter_openim_sdk
|
name: flutter_openim_sdk
|
||||||
description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source.
|
description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source.
|
||||||
version: 2.3.4
|
version: 2.3.4+1
|
||||||
homepage: https://www.rentsoft.cn
|
homepage: https://www.rentsoft.cn
|
||||||
repository: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter
|
repository: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user