WebRTC Client-Server project
ฝัง
- เผยแพร่เมื่อ 7 ก.พ. 2025
- The client is a web app written using JavaScript, and HTML. It displays the video of a ball bouncing in 2D space. The video is generated by the server written in Python.
The client and server communicate using the WebRTC protocol to transfer video frames.
Upon receiving the video frames, computation is done to extract the ball's coordinates and send them back to the server. To compute the error, the server compares the coordinates from the client (currently shown on the screen) with the current generated frame. This indicates the delay in the communication. The error is then sent back to the client and displayed together with the coordinates.
Frame rate control: an extra functionality is the frame rate control. The client can select at which frame rate the video is. As shown in the video, when the client selects a low frame rate, the video will be lagging, while at a high frame rate, the video is smoother.