{"id":19703578,"url":"https://github.com/monibuca/plugin-room","last_synced_at":"2025-10-05T12:52:01.502Z","repository":{"id":57696391,"uuid":"490099718","full_name":"Monibuca/plugin-room","owner":"Monibuca","description":"可用于视频会议等多人实时音视频场景","archived":false,"fork":false,"pushed_at":"2024-07-09T11:57:27.000Z","size":110,"stargazers_count":8,"open_issues_count":2,"forks_count":10,"subscribers_count":2,"default_branch":"v4","last_synced_at":"2025-07-09T12:52:54.202Z","etag":null,"topics":["golang","meeting"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Monibuca.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-09T01:40:43.000Z","updated_at":"2025-06-07T10:03:12.000Z","dependencies_parsed_at":"2023-12-13T08:59:01.364Z","dependency_job_id":"84b68db3-ba71-4ab9-b29d-516765dd347f","html_url":"https://github.com/Monibuca/plugin-room","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/Monibuca/plugin-room","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-room","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-room/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-room/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-room/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Monibuca","download_url":"https://codeload.github.com/Monibuca/plugin-room/tar.gz/refs/heads/v4","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-room/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278457470,"owners_count":25989955,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["golang","meeting"],"created_at":"2024-11-11T21:18:20.584Z","updated_at":"2025-10-05T12:52:01.463Z","avatar_url":"https://github.com/Monibuca.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Room 插件\n\n可以用于视频会议等，多人实时视频场景\n\n## 插件地址\n\nhttps://github.com/Monibuca/plugin-room\n\n## 插件引入\n\n```go\n    import (  _ \"m7s.live/plugin/room/v4\" )\n```\n\n## 配置\n\n默认配置如下：\n\n```yaml\nroom:\n  subscribe: # 房间作为特殊流，只订阅data track用于传输信令\n    subaudio: false # 默认不订阅音频\n    subvideo: false # 默认不订阅视频\n  http: # 默认使用全局http配置\n    listenaddr: :8080\n    listenaddrtls: \"\"\n    certfile: \"\"\n    keyfile: \"\"\n    cors: true\n    username: \"\"\n    password: \"\"\n  appname: room # 房间用于广播数据的流的AppName（StreamPath=AppName/RoomID）\n  size: 20 # 房间大小（最大人数）\n  private: {} # 私密房间配置，key是房间ID，value是密码\n  verify: # 入房验证远程请求\n    url: \"\"\n    method: \"\"\n    header: {}\n```\n\n## 插件使用方式\n\n通过WebSocket建立与本插件的连接，规则如下：\n- `ws://localhost:8080/room/[roomID]/[userID]` 建立连接,如果是私密房间，需要携带密码（?password=xxx)\n- 连接建立后，客户端接收到`{\"data\":{\"token\":\"4f8990a1-e7ae-4926-81b0-a3ab191c8e3b\",\"userList\":[]},\"event\":\"joined\"}`代表进房成功，token用于发布流时的参数\n   - 当有用户进房，客户端会收到`{\"data\":{\"ID\":\"xxx\",\"StreamPath\":\"xxx\"},\"event\":\"userjoin\"}`用户进房通知，data是用户信息\n   - 当有用户离房，客户端会收到`{\"userId\":xxx,\"event\":\"userleave\"}`用户离房通知,userId代表离房的用户ID\n   - 当有用户发布流的时候，房间内其他人会收到事件：`{\"data\":\"[streamPath]\",\"event\":\"publish\",\"userId\":\"dexter\"}`,用户可以选择订阅这个流\n- 进房后，可以通过WebSocket发送任意文本数据，该数据会被广播到房间内的其他用户(包括自己)，格式：`{\"data\":\"abc\",\"event\":\"msg\",\"userId\":\"dexter\"}`\n- 在房间里面可以发布视频流，发布流的时候需要在StreamPath后面携带参数token。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonibuca%2Fplugin-room","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonibuca%2Fplugin-room","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonibuca%2Fplugin-room/lists"}