kevin.song 2260702f75 [demo] - udpate comment 5 年 前
..
css 077711b50c [pureJS-demo] - refactor - 使用 play 方法播放 5 年 前
js 2260702f75 [demo] - udpate comment 5 年 前
.gitignore 812a74a77c [purejs demo] - 和 react 统一 6 年 前
README.md 51e81917e9 Update README.md 5 年 前
index.html 8acf8bebc1 [pureJS demo] - 检测浏览器是否支持自动播放 5 年 前
package.json 638a716792 [purejs demo] - 更新样式 6 年 前

README.md

URTC-demo(纯 JS 版本)

运行步骤

  1. 添加配置

js 目录下的 创建 config.js 文件,并配置 AppId 和 AppKey,示例代码:

window.config = {
  AppId: 'urtc-xxxxxxxx',
  AppKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
}

注:

  1. AppId 和 AppKey 可从 URTC 产品中获取
  2. AppKey 不可暴露于公网,建议生产环境时,由后端进行保存并由前端调 API 获取
  1. 安装 npm 依赖包

在本地demo目录下,执行以下操作:

npm install
  1. 执行运行命令
npm start
  1. 打开页面

浏览器打开 http://localhost:3001