{"id":21221378,"url":"https://github.com/garryone/webrtc-testing-connection","last_synced_at":"2026-04-24T18:41:18.871Z","repository":{"id":209965002,"uuid":"725373808","full_name":"GarryOne/webrtc-testing-connection","owner":"GarryOne","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-30T03:03:29.000Z","size":9947,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-01T21:50:10.263Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GarryOne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-30T02:14:53.000Z","updated_at":"2023-11-30T02:16:03.000Z","dependencies_parsed_at":"2023-11-30T03:37:39.685Z","dependency_job_id":null,"html_url":"https://github.com/GarryOne/webrtc-testing-connection","commit_stats":null,"previous_names":["garryone/webrtc-testing-connection"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GarryOne/webrtc-testing-connection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarryOne%2Fwebrtc-testing-connection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarryOne%2Fwebrtc-testing-connection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarryOne%2Fwebrtc-testing-connection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarryOne%2Fwebrtc-testing-connection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GarryOne","download_url":"https://codeload.github.com/GarryOne/webrtc-testing-connection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarryOne%2Fwebrtc-testing-connection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32236744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T22:27:22.510Z","updated_at":"2026-04-24T18:41:13.863Z","avatar_url":"https://github.com/GarryOne.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Development mode\n\nClient side\n1. Run `npm i -g live-server`\n2. Run `live-server public`\n3. See the result: https://127.0.0.1:8080\n\nBackend side\n1. Have `go` installed (`brew install go`)\n2. Run `cd play-from-disk-h264`\n3. Run `go run main.go`\n4. You'll have the WebRTC server available at: https://127.0.0.1:4000\n\n\n## Build mode / Production mode\n1. Have `Docker` and `Docker compose` installed\n2. Run `docker compose up`\n\n## Testing scenarios\nGiven the `Acceptance Criteria\" \n* `Client browser \u0026 Camera in same building:`\n* `Client browser \u0026 Camera in different buildings:`\n\nI understood it like being in the same local network or having some sort of NAT/firewall/proxy between the client and the server. \nFor this network scenarios, I left a TODO, but what I've managed to accomplish is trying a connection to a hard-coded URL (Go WebRTC Server) using 3 different ways\n* P2P / Local\n* STUN\n* TURN\n\nAlso, I've displayed the logs, the video streaming, and the connection status in the UI\n\n## How I've approached the problem\n\nI needed to test WebRTC connection to ... where?\nSo, one of my initial targets was to build a server that simulates a camera, in order to be able to perform my testing scenarios.\n\nI've tried initially `aiortc` from python ecosystem and didn't work. \nWhat did work was `pion` package from go. \n\nI've took the below example and slightly modified the script to turn it from stdin/stdout to a HTTP Server so that I can use from my JS app\nhttps://github.com/pion/example-webrtc-applications/tree/master/play-from-disk-h264\n\nFollowing the tutorial, I've took a a sample video (`play-from-disk-h264/video.mp4`) \nand by running some `ffmpeg` commands I've generated the `output.h264` and `output.ogg` which are used for streaming (simulating a camera stream)\n\n\n## TODOs\n\n1. Implement Docker compose networks to simulate **NAT** / **Firewalls** scenarios\n2. Add a form where we'll insert the camera servers (URLs) that we want to test the connection and don't use anymore the hardcoded URL `http://127.0.0.1:4000`\n3. Add a form where we'll insert the available **TURN** / **STUN** servers/credentials\n4. Store the sensitive data encrypted or/and into a database\n5. Resolve Known issues mentioned below\n\n## Known issue\nWhen you run the script manually as `go run main.go`, on **MacOS** you'll get a popup from the OS firewall, asking\n```\nDo you want the application “main” to accept incoming network connections?\n```\n\nOnly click `Allow` will make the WebRTC connection work.\nIf you start it through docker, you'll not get any popups of course, neither the connection will work.\nYou'll gett these logs on the `go-webrtc` service:\n\n``` \nonvu-tech-go-webrtfc-1  | Connection State has changed failed \nonvu-tech-go-webrtfc-1  | Peer Connection State has changed: failed\nonvu-tech-go-webrtfc-1  | Peer Connection has gone to failed exiting\n```\n\n\n## Mentions\nI did use ChatGPT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarryone%2Fwebrtc-testing-connection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarryone%2Fwebrtc-testing-connection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarryone%2Fwebrtc-testing-connection/lists"}