1. Open TRTC_Web/quick-demo-js/index.html
.
2. Fill in the SDKAppId and SDKSecretKey obtained in Step2
3. Function Experience:
Click Enter Room to enter the room.
Click Start Local Audio/Video to capture microphone or camera.
Click Stop Local Audio/Video to stop capturing microphone or camera.
Click Start Share Screen to start screen sharing.
Click Stop Share Screen to cancel screen sharing.
4. After entering the room, you can invite others to experience the TRTC Web voice and video communication feature together by sharing the invitation link.
1. Change to the directory TRTC_Web/quick-demo-vue2-js/
.
2. Run the demo locally by executing the following command in the terminal, which will automatically install dependencies and run the demo.
You may need to install Node.js in advance. 3. The default browser will automatically open the address http://localhost:8080/
.
4. Fill in the SDKAppId and SDKSecretKey obtained in Step2.
5. Experience
Input userId and roomId
Click Enter Room to enter the room
Click Start Local Audio/Video to capture microphone or camera
Click Stop Local Audio/Video to stop capturing microphone or camera
Click Start Share Screen to start screen sharing
Click Stop Share Screen to stop screen sharing
6. After entering the room, you can invite others to experience TRTC's web-based audio and video communication feature by sharing the invitation link.
1. Change to the directory TRTC_Web/quick-demo-vue3-ts/
.
2. Run the demo locally by executing the following command in the terminal, which will automatically install dependencies and run the demo.
You may need to install Nodejs first. 3. The default browser will automatically open the address http://localhost:3000/
.
4. Fill in the SDKAppId and SDKSecretKey obtained in Step2.
5. Experience
Input userId and roomId
Click Enter Room to enter the room
Click Start Local Audio/Video to capture microphone or camera
Click Stop Local Audio/Video to stop capturing microphone or camera
Click Start Share Screen to start screen sharing
Click Stop Share Screen to stop screen sharing
6. After entering the room, you can invite others to experience TRTC's web-based audio and video communication feature by sharing the invitation link.
Note:
In the demo above, we used SDKSecretKey to generate UserSig locally in order to help you go through the demo easier. However, in the production environment, you are not supposed to generate userSig in this way, which may lead to SDKSecretKey leakage, thereby creating a chance for attackers to steal your TRTC traffic.
Send a http request to your server.
Generate a UserSig on your server.
Return it to the user to enter the room.
When you deploy your page to a production environment, you need to have your page accessed through the HTTPS(e.g. https://domain/xxx
). For the reason, please refer to the document Page Access Protocol Restriction Description.
Was this page helpful?