微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

iOS 和 Android 之间的 Twilio 视频通话

如何解决iOS 和 Android 之间的 Twilio 视频通话

iOSandroid 使用此方法连接时需要设置什么配置(preferredAudioCodecs、preferredVideoCodecs、encodingParameters、region)

let connectOptions = ConnectOptions(token: accesstoken) { (builder) in
            
            // Use the local media that we prepared earlier.
            builder.audioTracks = self.localAudioTrack != nil ? [self.localAudioTrack!] : [LocalAudioTrack]()
            builder.videoTracks = self.localVideoTrack != nil ? [self.localVideoTrack!] : [LocalVideoTrack]()
            
            // Use the preferred audio codec
            if let preferredAudioCodec = Settings.shared.audioCodec {
                builder.preferredAudioCodecs = [preferredAudioCodec]
            }
            
            // Use the preferred video codec
            if let preferredVideoCodec = Settings.shared.videoCodec {
                builder.preferredVideoCodecs = [preferredVideoCodec]
            }
            
            // Use the preferred encoding parameters
            if let encodingParameters = Settings.shared.getEncodingParameters() {
                builder.encodingParameters = encodingParameters
            }
            
            // Use the preferred signaling region
            if let signalingRegion = Settings.shared.signalingRegion {
                builder.region = signalingRegion
            }
            
            // The name of the Room where the Client will attempt to connect to. Please note that if you pass an empty
            // Room `name`,the Client will create one for you. You can get the name or sid from any connected Room.
                builder.roomName = self.fb_id

        }
        
        // Connect to the Room using the options we provided.
        room = TwilioVideoSDK.connect(options: connectOptions,delegate: self)
        
        //     logMessage(messageText: "Attempting to connect to room \(String(describing: self.roomTextField.text))")
        
    }

我能够在 iOS 和 iOS 之间进行连接,但在 iOS 和 Android 之间的连接无法获得 RemoteParticipant 时遇到问题。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。