Ios 无法在AVPlayer中播放RTMP url?

Ios 无法在AVPlayer中播放RTMP url?,ios,objective-c,iphone,rtmp,Ios,Objective C,Iphone,Rtmp,我试图在AVPlayer中播放上面的URL,并得到以下错误 2018-06-08 14:55:00.326842+0530视频[14773:4486922]NSURL连接已完成,但出现错误-代码-1002 2018-06-08 14:55:00.605227+0530视频[14773:4485935][]>-[AVFIGroundedDiscoverOutputDeviceDiscoverySessionImpl输出设备DiscoverySessionDidChangeDiscoveryMode

我试图在AVPlayer中播放上面的URL,并得到以下错误

2018-06-08 14:55:00.326842+0530视频[14773:4486922]NSURL连接已完成,但出现错误-代码-1002 2018-06-08 14:55:00.605227+0530视频[14773:4485935][]>-[AVFIGroundedDiscoverOutputDeviceDiscoverySessionImpl输出设备DiscoverySessionDidChangeDiscoveryMode:]:将设备发现模式设置为DiscoveryMode_None(客户端:视频) 2018-06-08 14:55:00.652598+0530视频[14773:4485935][]>-[AVFIGroundedDiscoverOutputDeviceDiscoverySessionImpl输出设备DiscoverySessionDidChangeDiscoveryMode:]:将设备发现模式设置为DiscoveryMode\u状态(客户端:视频) 2018-06-08 14:55:01.013628+0530视频[14773:4485935][App]如果我们在真正的预提交处理程序中,由于CA限制,我们实际上无法添加任何新的围栏 2018-06-08 14:55:01.013766+0530视频[14773:4485935][App]如果我们在真正的预提交处理程序中,由于CA限制,我们实际上无法添加任何新的围栏


AVPlayer不支持rtmp。您必须使用不同的播放器或协议

我认为您需要在info.plist->url中添加
rtmp://
schema@MahendraGP仍然得到相同的错误。
- (void)playMethod {


 NSURL *url = [[NSURL alloc] initWithString:@"rtmp://54.206.31.70:1935/CVIEW_alpha/24"];


    player = [AVPlayer playerWithURL:url];
    controller = [[AVPlayerViewController alloc] init];
    [self addChildViewController:controller];
    [self.view addSubview:controller.view];

    //to rotate to the landscape on click of play button
    [[UIDevice currentDevice] setValue:@(UIInterfaceOrientationLandscapeLeft) forKey:@"orientation"];
    [UINavigationController attemptRotationToDeviceOrientation];

    //to open the view
    controller.view.frame = CGRectMake(0,0,667,375);
    controller.player = player;
    controller.showsPlaybackControls = YES;

    // to add the back button on player
    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
    [button1 addTarget:self
                action:@selector(backMethod)
      forControlEvents:UIControlEventTouchUpInside];
    [button1 setTitle:@"Back" forState:UIControlStateNormal];
    [button1 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    button1.frame = CGRectMake(50.0, CGRectGetMinY(controller.view.frame)+10, 160.0, 40.0);
    button1.tag = 1001;
    [self.view addSubview:button1];
    [controller.view  bringSubviewToFront:button1];
    [player pause];
    [player play];
}