当前位置:网站首页>在小程序中实现视频通话及互动直播的一种方法
在小程序中实现视频通话及互动直播的一种方法
2022-06-23 08:42:00 【pak】
在直播行业如火如荼的当下,越来越多的企业选择发展自己的直播平台,或者希望在原有的app中上架音视频、直播功能。开发一个直播功能难易程度如何呢? 直播难:要想把直播从零开始做出来,技术难度还是很高的,因为直播中运用到的技术难点非常之多,视频/音频处理,图形处理,视频/音频压缩,CDN分发,即时通讯等技术,每一项技术都非常专业。 直播易:好在当下各个领域的大牛,已经封装好了许多牛逼的框架,我们只需要用别人写好的框架,就能快速的搭建一个直播app,也就是传说中的站在大牛肩膀上编程。 如何才能简单便利的搭建一个直播平台呢?以下用开发者在 FinClip 小程序中实现视频通话及互动直播等功能举例:
准备开发环境
1、请确保本地已安装微信开发者工具
2、请确保有一个支持 live-pusher 和 live-player 组件的微信公众平台账号。只有特定行业的认证企业账号才可使用这两个组件。详情查看FinClip文档中心:https://www.finclip.com/mop/document/develop/component/media.html#live-pusher
3、请确保在微信公众平台账号的开发设置中,给予以下域名请求权限:
- https://miniapp.agoraio.cn
- https://uni-webcollector.agora.io
- wss://miniapp.agoraio.cn
4、若使用的是1.1.2 BETA后的版本,则需要额外添加以下域名
- https://miniapp-1.agoraio.cn
- https://miniapp-2.agoraio.cn
- https://miniapp-3.agoraio.cn
- https://miniapp-4.agoraio.cn
运行示例程序
- 在 FinClip 与 Agora.io 注册账号,并创建自己的测试项目,获取 App ID。如需获取 Token 或 Channel Key,请启用 App Certificate
- 下载本页示例程序
- 打开 utils 文件夹,在 config.js 文件中填入获取到的 App ID: const APPID = 'abcdefg'
- 下载 Agora Miniapp SDK,并将 SDK 重新命名为 “mini-app-sdk-production.js"
- 将更名后的 "mini-app-sdk-production.js" 文件保存在本示例程序的 lib 文件夹下
- 启动微信开发者工具并导入该示例程序
- 输入频道名,加入频道。邀请你的朋友加入同一个频道,就可以开始视频互通了。
声网的 Native SDK 可以直接与小程序互通。
边栏推荐
- 简易学生管理
- Happy number of leetcode topic analysis
- 通信方式总结及I2C驱动详解
- In depth interpretation of poca smart contract platform gear: the road to parallel architecture public chain
- 636. Exclusive Time of Functions
- XSS via host header
- 2- use line segments to form graphics and coordinate conversion
- (resolved) difference between leftmost prefix and overlay index
- Dongyuhui, the "square face teacher", responded that the popularity was declining: do a good job of live broadcasting of agricultural products to benefit farmers and consider supporting education
- The most commonly used 5-stream ETL mode
猜你喜欢

The first day of employment more than ten years ago

【学习资源】理解数学和热爱数学

Self organizing map neural network (SOM)

鸿蒙读取资源文件

GeoServer adding mongodb data source

6月《中國數據庫行業分析報告》發布!智能風起,列存更生

Point cloud library PCL from introduction to mastery Chapter 10

测试-- 自动化测试selenium(关于API)

论文阅读【Quo Vadis, Action Recognition? A New Model and the Kinetics Dataset】

Geoserver添加mongoDB数据源
随机推荐
On the light application platform finclip and the mobile application development platform mpaas
通用分页(1)
Self organizing map neural network (SOM)
How thingjs enables low threshold 3D visualization development
Arclayoutview: implementation of an arc layout
XSS via host header
Monitor the cache update of Eureka client
【云计算】GFS思想优势以及架构
6、 Web Architecture Design
Android kotlin coroutines KTX extension
How to restore visualizations and dashboards after kibana rebuilds the index
438. Find All Anagrams in a String
6月《中国数据库行业分析报告》发布!智能风起,列存更生
Tencent cloud arm server evaluation practice
Summary ranges of leetcode topic resolution
125. Valid Palindrome
3-progressbar and secondary cropping
最常用的5中流ETL模式
Open source stealing malware mercurial found in the field for "educational purposes"
社区文章|MOSN 构建 Subset 优化思路分享