前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >评测精选 | 腾讯云移动直播SDK使用体验测评

评测精选 | 腾讯云移动直播SDK使用体验测评

作者头像
腾讯云音视频
发布2020-06-01 14:40:30
3.4K0
发布2020-06-01 14:40:30
举报
文章被收录于专栏:音视频咖

移动直播SDK文档地址

代码语言:javascript
复制
TXLiveBase.getInstance().setLicence(this, licenceURL, licenceKey);

推流配置文档操作

代码语言:javascript
复制
// 配置 TXLivePushConfig mLivePushConfig  = new TXLivePushConfig();TXLivePusher mLivePusher = new TXLivePusher(this); mLivePusher.setConfig(mLivePushConfig);// mPusherView 是 SDK 定义的控件mLivePusher.startCameraPreview(mPusherView);// 启动推流 mLivePusher.startPusher(rtmpURL.trim());// 结束推流 mLivePusher.stopPusher();mLivePusher.stopCameraPreview(true);
代码语言:javascript
复制
mLivePlayer = new TXLivePlayer(mContext);mPlayConfig = new TXLivePlayConfig(); // mPlayerView 是 SDK 定义的控件 mLivePlayer.setPlayerView(mPlayerView); mLivePlayer.setConfig(mPlayConfig); // 开始播放mLivePlayer.startPlay(flvUrl, TXLivePlayer.PLAY_TYPE_LIVE_FLV);// 结束播放mLivePlayer.stopPlay(true); mPlayerView.onDestroy();
代码语言:javascript
复制
mLivePlayer.switchStream("new_stream_url");
代码语言:javascript
复制
// 设置是否自动调整缓存时间mPlayConfig.setAutoAdjustCacheTime(true); // 设置最小缓存时间 mPlayConfig.setMinAutoAdjustCacheTime(1);// 设置最大缓存时间 mPlayConfig.setMaxAutoAdjustCacheTime(5);
本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2020-05-28,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 腾讯云音视频 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
直播 SDK
腾讯云视立方·直播 SDK 是音视频终端 SDK(腾讯云视立方)针对移动直播场景专属打造的产品,集成了腾讯云直播的推 / 拉流、主播观众互动连麦、主播跨房 PK 等能力,为您提供高质量直播服务,快速满足移动直播的需求。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档