-
Notifications
You must be signed in to change notification settings - Fork 116
Description
Describe the bug
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 piece of code from my private app, where ios behavior is the same
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();
}
}
To Reproduce
Steps to reproduce the behavior:
- Just download code from this repo and run to connect with others.
Expected behavior
It should work like web implementation.
Smartphone (please complete the following information):
- Device: iphone 6s
- OS: ios
- Version 3.1.2