当前位置: 首页 > news >正文

销售网站内容设计方案企业网站用什么建站最快

销售网站内容设计方案,企业网站用什么建站最快,永嘉哪里有做网站,怎么给网站做友情链接WebRTC音视频通话-iOS端调用ossrs直播拉流 之前实现iOS端调用ossrs服务#xff0c;文中提到了推流。没有写拉流流程#xff0c;所以会用到文中的WebRTCClient。请详细查看#xff1a;https://blog.csdn.net/gloryFlow/article/details/132262724 一、iOS播放端拉流效果 二…WebRTC音视频通话-iOS端调用ossrs直播拉流 之前实现iOS端调用ossrs服务文中提到了推流。没有写拉流流程所以会用到文中的WebRTCClient。请详细查看https://blog.csdn.net/gloryFlow/article/details/132262724 一、iOS播放端拉流效果 二、实现iOS端调用ossrs拉流 最近有朋友问过我发现之前少了一块拉流流程这里补充一下。 2.1、拉流实现时候设置WebRTCClient 拉流实现时候设置WebRTCClient时候初始化这里isPublish为false哦 #pragma mark - Lazy - (WebRTCClient *)webRTCClient {if (!_webRTCClient) {_webRTCClient [[WebRTCClient alloc] initWithPublish:NO];}return _webRTCClient; }2.2、设置拉流显示的画面View。 之前的文中摄像头画面显示使用的是startCaptureLocalVideo但是拉流需要设置remoteRenderView WebRTCClient中有定义 /**RTCVideoRenderer*/ property (nonatomic, weak) idRTCVideoRenderer remoteRenderView;设置拉流显示的画面View #import RTCPlayView.hinterface RTCPlayView ()property (nonatomic, strong) WebRTCClient *webRTCClient; property (nonatomic, strong) RTCEAGLVideoView *remoteRenderer;endimplementation RTCPlayView- (instancetype)initWithFrame:(CGRect)frame webRTCClient:(WebRTCClient *)webRTCClient {self [super initWithFrame:frame];if (self) {self.webRTCClient webRTCClient;self.remoteRenderer [[RTCEAGLVideoView alloc] initWithFrame:CGRectZero];self.remoteRenderer.contentMode UIViewContentModeScaleAspectFit;[self addSubview:self.remoteRenderer];self.webRTCClient.remoteRenderView self.remoteRenderer;}return self; }- (void)layoutSubviews {[super layoutSubviews];self.remoteRenderer.frame self.bounds;NSLog(self.remoteRenderer frame:%, NSStringFromCGRect(self.remoteRenderer.frame)); }end这里使用的创建RTCEAGLVideoView设置self.webRTCClient.remoteRenderView为self.remoteRenderer 2.3、调用ossrs服务play接口为rtc/v1/play/ 实现拉流调用流程和推流类似这里不再说明请查看 https://blog.csdn.net/gloryFlow/article/details/132262724 具体方法如下 - (void)playBtnClick {__weak typeof(self) weakSelf self;[self.webRTCClient offer:^(RTCSessionDescription *sdp) {[weakSelf.webRTCClient changeSDP2Server:sdp urlStr:https://192.168.10.102:1990/rtc/v1/play/ streamUrl:webrtc://192.168.10.102:1990/live/livestream closure:^(BOOL isServerRetSuc) {NSLog(isServerRetSuc:%,(isServerRetSuc?YES:NO));}];}]; }完整的Controller代码如下 #import RTCPlayViewController.hinterface RTCPlayViewController ()WebRTCClientDelegateproperty (nonatomic, strong) WebRTCClient *webRTCClient;property (nonatomic, strong) RTCPlayView *rtcPlayView;property (nonatomic, strong) UIButton *playBtn;endimplementation RTCPlayViewController- (void)viewDidLoad {[super viewDidLoad];// Do any additional setup after loading the view.self.view.backgroundColor [UIColor whiteColor];self.rtcPlayView [[RTCPlayView alloc] initWithFrame:CGRectZero webRTCClient:self.webRTCClient];[self.view addSubview: self.rtcPlayView];self.rtcPlayView.backgroundColor [UIColor lightGrayColor];self.rtcPlayView.frame self.view.bounds;CGFloat screenWidth CGRectGetWidth(self.view.bounds);CGFloat screenHeight CGRectGetHeight(self.view.bounds);self.playBtn [UIButton buttonWithType:UIButtonTypeCustom];self.playBtn.frame CGRectMake(50, screenHeight - 160, screenWidth - 2*50, 46);self.playBtn.layer.cornerRadius 4;self.playBtn.backgroundColor [UIColor grayColor];[self.playBtn setTitle:publish forState:UIControlStateNormal];[self.playBtn addTarget:self action:selector(playBtnClick) forControlEvents:UIControlEventTouchUpInside];[self.view addSubview:self.playBtn];self.webRTCClient.delegate self; }- (void)playBtnClick {__weak typeof(self) weakSelf self;[self.webRTCClient offer:^(RTCSessionDescription *sdp) {[weakSelf.webRTCClient changeSDP2Server:sdp urlStr:https://192.168.10.102:1990/rtc/v1/play/ streamUrl:webrtc://192.168.10.102:1990/live/livestream closure:^(BOOL isServerRetSuc) {NSLog(isServerRetSuc:%,(isServerRetSuc?YES:NO));}];}]; }#pragma mark - WebRTCClientDelegate - (void)webRTCClient:(WebRTCClient *)client didDiscoverLocalCandidate:(RTCIceCandidate *)candidate {NSLog(webRTCClient didDiscoverLocalCandidate); }- (void)webRTCClient:(WebRTCClient *)client didChangeConnectionState:(RTCIceConnectionState)state {NSLog(webRTCClient didChangeConnectionState);/**RTCIceConnectionStateNew,RTCIceConnectionStateChecking,RTCIceConnectionStateConnected,RTCIceConnectionStateCompleted,RTCIceConnectionStateFailed,RTCIceConnectionStateDisconnected,RTCIceConnectionStateClosed,RTCIceConnectionStateCount,*/UIColor *textColor [UIColor blackColor];BOOL openSpeak NO;switch (state) {case RTCIceConnectionStateCompleted:case RTCIceConnectionStateConnected:textColor [UIColor greenColor];openSpeak YES;break;case RTCIceConnectionStateDisconnected:textColor [UIColor orangeColor];break;case RTCIceConnectionStateFailed:case RTCIceConnectionStateClosed:textColor [UIColor redColor];break;case RTCIceConnectionStateNew:case RTCIceConnectionStateChecking:case RTCIceConnectionStateCount:textColor [UIColor blackColor];break;default:break;}dispatch_async(dispatch_get_main_queue(), ^{NSString *text [NSString stringWithFormat:%ld, state];[self.playBtn setTitle:text forState:UIControlStateNormal];[self.playBtn setTitleColor:textColor forState:UIControlStateNormal];if (openSpeak) {[self.webRTCClient speakOn];} // if textColor .green { // self?.webRTCClient.speakerOn() // }}); }- (void)webRTCClient:(WebRTCClient *)client didReceiveData:(NSData *)data {NSLog(webRTCClient didReceiveData); }#pragma mark - Lazy - (WebRTCClient *)webRTCClient {if (!_webRTCClient) {_webRTCClient [[WebRTCClient alloc] initWithPublish:NO];}return _webRTCClient; }end至此可以实现iOS端调用的ossrs视频通话拉流 其他 之前搭建ossrs服务可以查看https://blog.csdn.net/gloryFlow/article/details/132257196 之前实现iOS端调用ossrs音视频通话可以查看https://blog.csdn.net/gloryFlow/article/details/132262724 之前WebRTC音视频通话高分辨率不显示画面问题可以查看https://blog.csdn.net/gloryFlow/article/details/132240952 修改SDP中的码率Bitrate可以查看https://blog.csdn.net/gloryFlow/article/details/132263021 GPUImage视频通话视频美颜滤镜可以查看https://blog.csdn.net/gloryFlow/article/details/132265842 RTC直播本地视频或相册视频可以查看https://blog.csdn.net/gloryFlow/article/details/132267068 三、小结 WebRTC音视频通话-iOS端调用ossrs直播拉流。用到了WebRTC调用ossrs实现推拉流效果。内容较多描述可能不准确请见谅。 https://blog.csdn.net/gloryFlow/article/details/132417602 学习记录每天不停进步。
http://www.zqtcl.cn/news/485598/

相关文章:

  • 能打开各种网站的浏览器app文章目录wordpress
  • 网站注册页面html中国建设招标网网站
  • 云南网站设计海外直购网站建设方案书范文
  • 网站视频小程序商城多少钱
  • 美耐皿 技术支持 东莞网站建设如何将网站指向404
  • 如何做网站的维护和推广wordpress首页在哪里修改
  • 网站建设公司在哪里宣传网站群系统建设的目的
  • 建立网站的教学书籍最新网站建设哪家公司好
  • 视频网站开发者工具科技网站新版网站上线
  • 网站设计简单网页百度提交网站
  • 建设企业网站网站崩溃西安百度网站快速排名
  • 前端 国外 网站请人做网站得多少钱
  • 微商如何做网站引流上海市有哪些公司
  • 服务类型网站开发需要哪些技术中国设计师网效果图
  • 电子商务网站建设技术有哪些方面做婚礼请柬的网站有哪些
  • 做暖暖欧美网站全国职工素质建设工程专题网站
  • 策划对于企业网站建设来说网站开发新加坡
  • 做仪表行业推广有哪些网站个人网站备案模板
  • 做微网站是订阅号还是服务号号网站建设叫什么软件
  • 美团初期是怎么建网站特效视频素材网站
  • 网站建设行业市场分析刚创业 建网站
  • 网站推广昔年下拉wordpress 首页添加链接地址
  • 网站年费推荐专业做网站公司
  • 邵东微网站建设设计网页图片
  • 沈阳高端做网站建设应用软件商店
  • 05网站首页设计说明
  • 给企业做网站运营手机做简单的网站
  • 做网站卖广告国家公示企业信息查询系统
  • 西安网站建设公司找哪家如何做平台推广赚钱
  • 网站优化个人工作室怎么找网站开发公司