iOS WebRTC

想要在App内部使用WebRTC,不必跳出app,最简单的方式是直接使用 SFSafariViewController<需要注意的是iOS13以后才可以使用这个类,之前的还是乖乖跳转到Safari吧>

简单的使用方法如下:

#import <SafariServices/SafariServices.h>

    NSURL *url = [NSURL URLWithString:@"https://www.baidu.com"];

    SFSafariViewController *vc = [[SFSafariViewController alloc] initWithURL:url];

    vc.delegate = self;

    [self presentViewController:vc animated:YES completion:^{

    }];

这边是一个比较复杂的基于WebRTC的音视频通信总结,感兴趣的可以看一下

传送门

原文地址:https://www.cnblogs.com/jztsdwn/p/13750150.html