Sinch视频通话获取音频通话通知

时间:2017-03-01 14:42:55

标签: ios swift sinch

我收到“来电音频通话”,但是通话是视频

提示:我正在使用(IOS SDK 3.10.1)SDK和SinchService

这是代码:

func startVideoCall(userId: String, isPrivate: Bool) -> SINCall? {
        if let user = User.current {
            let callingId = userId
            if let callClient = self.callClient() {
                let privateString = isPrivate ? VoipCallConstants.Parameters.PrivateTrue : VoipCallConstants.Parameters.PrivateFalse
                let headers:[String: String] = [VoipCallConstants.Parameters.Private:privateString]
                let call = callClient.callUserVideo(withId: callingId, headers: headers)
                return call
            }
        }
        return nil
    }


func callClient() -> SINCallClient? {
        let appDelegate: AppDelegate = (UIApplication.shared.delegate as! AppDelegate)
        return appDelegate.sinch?.callClient()
    }

class AppDelegate: UIResponder, UIApplicationDelegate{

    var sinch: SINService!
    var push: SINManagedPush!
}

我添加了SINSLazyCallClient这个

- (id<SINCall>)callUserVideoWithId:(NSString *)userId {
    return [self callUserVideoWithId:userId headers:@{}];
}

- (id<SINCall>)callUserVideoWithId:(NSString *)userId headers:(NSDictionary *)headers {
    if (self.proxee) {
        return [self.proxee callUserVideoWithId:userId headers:headers];
    } else {
        return [[SINSFailedCall alloc] initWithUserId:userId headers:headers];
    }
}

这里是Localization.strings

SIN_INCOMING_CALL = "Incoming audio call";
SIN_INCOMING_CALL_DISPLAY_NAME = "Incoming audio call from %@";
SIN_INCOMING_VIDEO_CALL = "Incoming video call";
SIN_INCOMING_VIDEO_CALL_DISPLAY_NAME = "Incoming video call from %@";

1 个答案:

答案 0 :(得分:0)

感谢您的反馈。我们对此进行了调查,结果发现SIN_INCOMING_VIDEO_CALLSIN_INCOMING_VIDEO_CALL_DISPLAY_NAME的支持尚未在我们的系统中实现。一旦修复,我们会及时通知您。

相关问题