Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios webrtc对等连接不提供远程视频跟踪 背景_Ios_Objective C_Video Streaming_Webrtc - Fatal编程技术网

Ios webrtc对等连接不提供远程视频跟踪 背景

Ios webrtc对等连接不提供远程视频跟踪 背景,ios,objective-c,video-streaming,webrtc,Ios,Objective C,Video Streaming,Webrtc,我正在创建一个iOS应用程序,该应用程序使用(我正在使用iOS)在iOS客户端和web浏览器之间启用视频聊天 问题 给定我正在测试本地家庭网络中的连接 建立rtc连接时 然后我无法渲染远程视频 分析 对于RTPEERCONNECTION,存在以下约束条件: [[RTCMediaConstraints alloc] initWithMandatoryConstraints:nil optionalConstraints:@{@"DtlsSrtpKey

我正在创建一个iOS应用程序,该应用程序使用(我正在使用iOS)在iOS客户端和web浏览器之间启用视频聊天

问题
给定
我正在测试本地家庭网络中的连接
建立rtc连接时
然后
我无法渲染远程视频

分析 对于
RTPEERCONNECTION
,存在以下
约束条件

[[RTCMediaConstraints alloc]
            initWithMandatoryConstraints:nil
            optionalConstraints:@{@"DtlsSrtpKeyAgreement": @"true"}];
以及以下配置:

RTCConfiguration *config = [[RTCConfiguration alloc] init];
    config.iceServers = @[[self STUNServer]];
然后我添加本地流:

- (RTCMediaStream *)createLocalMediaStreamWithVideoTrack:(RTCVideoTrack *__autoreleasing *)videoTrack {
    RTCMediaStream* localStream = [self.factory mediaStreamWithStreamId:@"ARDAMS"];

    RTCVideoTrack *localVideoTrack = [self createLocalVideoTrack];
    if (localVideoTrack) {
        [localStream addVideoTrack:localVideoTrack];
    }
    if (videoTrack) {
        (*videoTrack) = localVideoTrack;
    }

    [localStream addAudioTrack:[self.factory audioTrackWithTrackId:@"ARDAMSa0"]];
    return localStream;
}
- (RTCVideoTrack *)createLocalVideoTrack {
    RTCVideoTrack *localVideoTrack = nil;
#if !TARGET_IPHONE_SIMULATOR && TARGET_OS_IPHONE
    RTCMediaConstraints *mediaConstraints = [HAHRTCDefaults mediaStreamConstraints];
    RTCVideoSource *videoSource = [self.factory avFoundationVideoSourceWithConstraints:mediaConstraints];
    localVideoTrack = [self.factory videoTrackWithSource:videoSource trackId:@"ARDAMSv0"];
#endif
    return localVideoTrack;
}
一旦需要谈判,我将创建具有以下约束的报价:

NSDictionary *mandatoryConstraints = @{@"OfferToReceiveAudio": @"true",
                                       @"OfferToReceiveVideo": @"true"};
RTCMediaConstraints* constraints =
    [[RTCMediaConstraints alloc]
        initWithMandatoryConstraints:mandatoryConstraints
        optionalConstraints:nil];
是本地会话描述:

本地Ice候选人:

audio
0
candidate:0 1 UDP 2122252543 192.168.0.100 57752 typ host

audio
0
candidate:1 1 UDP 1686052863 212.90.61.183 57752 typ srflx raddr 192.168.0.100 rport 57752
是远程会话描述

以下是Remote的Ice候选者:

audio
0
candidate:0 1 UDP 2122252543 192.168.0.100 57752 typ host

audio
0
candidate:1 1 UDP 1686052863 212.90.61.183 57752 typ srflx raddr 192.168.0.100 rport 57752

嗨,你能告诉我哪里有最新的代码可以使用吗?你有没有找到任何方法来解决这个问题,即使我也面临着类似的问题?我,你有没有找到解决问题的方法?我面临着类似的问题。你找到解决办法了吗?