I have implemented agora sdk into web, using capacitorjs framework. It works fine on all devices browsers, like ios safari, android chrome, desktops etc. It also works fine on android WebView. There appeard problem on ios. In docs is written that there must be a native implementation for ios. I used sample from official agora documentation (https://github.com/AgoraIO/Basic-Audio-Call/tree/master/Group-Voice-Call/OpenVoiceCall-iOS) and it looks that ios users hear everyone else, but nobody hear ios users. What did i wrong? Is there any additional magic setting? I tested on ios 13. Here is ios implementation:
import Foundation
import Capacitor
import AgoraRtcKit
@objc(AgoraIos)
public class AgoraIos: CAPPlugin {
var agoraKit: AgoraRtcEngineKit!
@objc func initialize(_ call: CAPPluginCall) {
let appId = call.getString("appId");
agoraKit = AgoraRtcEngineKit.sharedEngine(withAppId: appId, delegate: nil);
call.resolve();
}
@objc func join(_ call: CAPPluginCall) {
let channelName = call.getString("channelName");
let userId = call.getString("userId");
agoraKit.joinChannel(byToken: nil, channelId: channelName, info:nil, uid: userId) {[unowned self] (sid, uid, elapsed) -> Void in
self.agoraKit.setEnableSpeakerphone(true);
call.resolve();
}
}
@objc func leave(_ call: CAPPluginCall) {
agoraKit.leaveChannel(nil);
call.resolve();
}
@objc func talk(_ call: CAPPluginCall) {
agoraKit.muteLocalAudioStream(true);
call.resolve();
}
@objc func mute(_ call: CAPPluginCall) {
agoraKit.muteLocalAudioStream(false);
call.resolve();
}
}