GithubHelp home page GithubHelp logo

reklesswang / live-room-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tencentserverlessapps/live-room-service

0.0 0.0 0.0 233 KB

basic live streaming room service based on trtc

Makefile 0.52% JavaScript 98.87% Shell 0.62%

live-room-service's Introduction

LiveRoomService

互动直播房间服务

Usage

首先,需要开通腾讯云资源:

接着,安装云函数工具serverless/sls,安装依赖库:

npm install -g serverless
npm install

Note: 若安装sls有问题,请看官方说明文档sls,有详细解决办法。

Note: 关于Node安装,请参考nodejs,在Windows下请使用Administrator权限启动Node.js command prompt,不支持PowerShell。

然后,创建环境变量文件.env,根据.env.example修改,注意需要修改下面所有的xxx的内容:

Note: TRTC的应用在TRTC创建,和IM使用同样的应用。

最后,发布云函数,需要扫码授权或配置本地密钥授权

npm install
sls deploy

Note: Windows用户,请使用Administrator权限启动Node.js command prompt,否则扫码认证会失败。

从发布日志中获取API网关地址,写入客户端,例如:https://service-xxxyyzzz-1001234567.gz.apigw.tencentcs.com

image

Note: 在浏览器中直接打开你的网关地址,也应该是成功的才对,如上图所示。

FAQ

Q: 如何查看云函数的日志?

A: 查看云函数的日志,请点这里

Q: 如何删除云函数?

A: 若需要删除云函数,请执行命令:sls remove

Q: 为何网关返回的是SystemError(99): Invalid TRTC config

A: 请确认环境变量.env文件,请不要更改文件名,请检查是否正确配置了TRTC的SdkAppId(TRTC_TIM_APPID)和Secret(TRTC_TIM_SECRET)。

Q: 为何网关和函数无法访问?

A:请确认是否开通服务,请确认是否账户欠费。

Q:为何Windows无法发布云函数?

A: 请使用系统管理员(Administrator)启动Node.js command prompt,请不要用PowerShell。

Q: 如何确认网关创建成功?

A: 若能在浏览器访问,则网关正常:https://service-xxxyyzzz-1001234567.gz.apigw.tencentcs.com/helloworld

Q: 如何确认函数创建成功?

A: 若能在浏览器访问,则函数创建正常:https://service-xxxyyzzz-1001234567.gz.apigw.tencentcs.com

Discussion & Feedback

欢迎加入QQ群进行技术交流和反馈问题,QQ群:660488879

live-room-service's People

Contributors

ciryu avatar reklesswang avatar tianmeng0103 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.