ChatCallKitManagerImpl constructor
ChatCallKitManagerImpl()
Implementation
ChatCallKitManagerImpl() {
_chat = AgoraChatManager(
AgoraChatEventHandler(
onCallAccept: () {
onCallAccept();
},
onCallEndReason: (callId, reason) {
onCallEndReason(callId, reason);
},
onError: (error) {
onError(error);
},
onUserRemoved: (callId, userId, reason) {
onUserRemoved(callId, userId, reason);
},
onAnswer: (callId) {
onAnswer(callId);
},
), (newState, preState) {
stateChanged(newState, preState);
});
_rtc = AgoraRTCManager(
RTCEventHandler(
onJoinChannelSuccess: () {
onJoinChannelSuccess();
},
onActiveSpeaker: (uid) {
onActiveSpeaker(uid);
},
onError: (err, msg) {
onRTCError(err, msg);
},
onFirstRemoteVideoDecoded: (agoraUid, width, height) {
onFirstRemoteVideoDecoded(agoraUid, width, height);
},
onLeaveChannel: () {
onLeaveChannel();
},
onUserJoined: (agoraUid) {
onUserJoined(agoraUid);
},
onRemoteVideoStateChanged: (agoraUid, state, reason) {
onRemoteVideoStateChanged(agoraUid, state, reason);
},
onUserLeaved: (agoraUid) {
onUserLeaved(agoraUid);
},
onUserMuteAudio: (agoraUid, muted) {
onUserMuteAudio(agoraUid, muted);
},
onUserMuteVideo: (agoraUid, muted) {
onUserMuteVideo(agoraUid, muted);
},
),
);
}