{"id":18536036,"url":"https://github.com/tencent-rtc/wtn-demos","last_synced_at":"2026-04-09T14:05:26.373Z","repository":{"id":42980070,"uuid":"463124315","full_name":"Tencent-RTC/WTN-Demos","owner":"Tencent-RTC","description":"WTN(WebRTC Transmission Network) Demos","archived":false,"fork":false,"pushed_at":"2022-03-25T01:55:19.000Z","size":316,"stargazers_count":8,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T08:54:41.330Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tencent-RTC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-24T11:35:52.000Z","updated_at":"2022-08-02T04:26:09.000Z","dependencies_parsed_at":"2022-09-23T14:30:49.871Z","dependency_job_id":null,"html_url":"https://github.com/Tencent-RTC/WTN-Demos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tencent-RTC%2FWTN-Demos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tencent-RTC%2FWTN-Demos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tencent-RTC%2FWTN-Demos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tencent-RTC%2FWTN-Demos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tencent-RTC","download_url":"https://codeload.github.com/Tencent-RTC/WTN-Demos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248067765,"owners_count":21042351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-06T19:29:31.296Z","updated_at":"2026-04-09T14:05:26.332Z","avatar_url":"https://github.com/Tencent-RTC.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WTN-Demos\nWTN(WebRTC Transmission Network) Demos\n\n\n\n\n\n\n## HOW TO USE\n\n\n\n1, Create your own TRTC app in Tencent Cloud.\n\n2, Change your own `sdkappid` and `secret` in `server/config.ts`.\n\n***Note that WTN is not for public for now, you should contact me to add your sdkappid to white list***\n\n3, Run the server.\n\n```bash\ncd server/ \u0026\u0026 npm install \nnpx ts-node server.ts\n```\n\n4, Run the client.\n\n```bash\ncd client/ \u0026\u0026 npm install\nnpm run dev\n```\n\n\n## WTN(WebRTC Transmission Network)\n\n\nWTN(WebRTC Transmission Network) is based on Tencent's RTC(TRTC), providing a high-quality WebRTC service.\n\nIt provides a simple http signaling api based on `WHIP`,  and extend `WHIP` to support WebRTC playback.\n\n\n[WHIP ietf](https://datatracker.ietf.org/doc/html/draft-ietf-wish-whip-02)\n\n\n### Push stream \n\nPush URL\n\n`https://signaling.rtc.qcloud.com/v1/push/streamid?sdkappid=xxx\u0026userid=xxx\u0026usersig=xxxx`\n\n\n|  Params           |     Description      |    Required       |\n| ----------------- | -------------------- |  --------------   |\n| sdkappid          |   current sdkappid   |    YES            |\n| userid            |   current userid     |    YES            |\n| usersig           |   current usersig    |    YES            |\n| streamid          |   streamid           |    YES            |\n| prefervcodec      |   'h264' or 'vp8', h264 default  |    NO   |\n\n\nMethod: `POST`\n\nBody: `SDP`\n\nContent-Type: `application/sdp`\n\nResonse Code:\n\n```\n200/201: OK\n400: Bad Request\n403: Unauthorized\n404: Not Found\n409: Conflict, the steam exist\n```\n\nResponse Header:\n\n`Location: https://signaling.rtc.qcloud.com/v1/push/streamid?sdkappid=xxx\u0026userid=xxxx\u0026usersig=xxxxx\u0026relay=xxxxx`  \n\n***Location is the url used to stop the stream***\n\nResponse Body: `SDP`\n\n\n\n\n### Stop push stream \n\nStop URL\n\n`https://signaling.rtc.qcloud.com/v1/push/streamid?sdkappid=xxx\u0026userid=xxx\u0026usersig=xxxx?relay=xxxx`\n\n\n|  Params           |     Description      |    Required       |\n| ----------------- | -------------------- |  --------------   |\n| sdkappid          |   current sdkappid   |    YES            |\n| userid            |   current userid     |    YES            |\n| usersig           |   current usersig    |    YES            |\n| streamid          |   streamid           |    YES            |\n| relay             |   relay id           |    YES            |\n\n\nMethod: `DELETE`\n\nResonse Code:\n\n```\n200/201: OK\n400: Bad Request\n403: Unauthorized\n404: Not Found\n```\n\n\n\n### Play stream \n\nPush URL\n\n`https://signaling.rtc.qcloud.com/v1/play/streamid?sdkappid=xxx\u0026userid=xxx\u0026usersig=xxxx`\n\n\n|  Params           |     Description      |    Required       |\n| ----------------- | -------------------- |  --------------   |\n| sdkappid          |   current sdkappid   |    YES            |\n| userid            |   current userid     |    YES            |\n| usersig           |   current usersig    |    YES            |\n| streamid          |   streamid           |    YES            |\n\nMethod: `POST`\n\nBody: `SDP`\n\nContent-Type: `application/sdp`\n\nResonse Code:\n\n```\n200/201: OK\n400: Bad Request\n403: Unauthorized\n404: Not Found\n```\n\nResponse Header:\n\n`Location: https://signaling.rtc.qcloud.com/v1/play/streamid?sdkappid=xxx\u0026userid=xxxx\u0026usersig=xxxxx\u0026relay=xxxxx`  \n\n***Location is the url used to stop the stream***\n\nResponse Body: `SDP`\n\n\n### Stop Play stream \n\nStop URL\n\n`https://signaling.rtc.qcloud.com/v1/play/streamid?sdkappid=xxx\u0026userid=xxx\u0026usersig=xxxx?relay=xxxx`\n\n\n|  Params           |     Description      |    Required       |\n| ----------------- | -------------------- |  --------------   |\n| sdkappid          |   current sdkappid   |    YES            |\n| userid            |   current userid     |    YES            |\n| usersig           |   current usersig    |    YES            |\n| streamid          |   streamid           |    YES            |\n| relay             |   relay id           |    YES            |\n\n\nMethod: `DELETE`\n\nResonse Code:\n\n```\n200/201: OK\n400: Bad Request\n403: Unauthorized\n404: Not Found\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencent-rtc%2Fwtn-demos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftencent-rtc%2Fwtn-demos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencent-rtc%2Fwtn-demos/lists"}