{"id":17066360,"url":"https://github.com/shoyu666/open-im-server-call","last_synced_at":"2025-04-05T18:06:06.125Z","repository":{"id":63338874,"uuid":"542465868","full_name":"shoyu666/Open-IM-Server-Call","owner":"shoyu666","description":"Open-IM-Server 音视频通话","archived":false,"fork":false,"pushed_at":"2025-02-07T03:55:22.000Z","size":13786,"stargazers_count":104,"open_issues_count":0,"forks_count":45,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T17:03:54.350Z","etag":null,"topics":["im","open-im-server","openim","real-time","realtime","video","video-call","webrtc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shoyu666.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}},"created_at":"2022-09-28T07:37:15.000Z","updated_at":"2025-03-27T06:00:45.000Z","dependencies_parsed_at":"2024-06-21T15:33:21.838Z","dependency_job_id":"50dea42e-d3d6-49d0-8ebe-157157b336fa","html_url":"https://github.com/shoyu666/Open-IM-Server-Call","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoyu666%2FOpen-IM-Server-Call","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoyu666%2FOpen-IM-Server-Call/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoyu666%2FOpen-IM-Server-Call/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shoyu666%2FOpen-IM-Server-Call/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shoyu666","download_url":"https://codeload.github.com/shoyu666/Open-IM-Server-Call/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378140,"owners_count":20929296,"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":["im","open-im-server","openim","real-time","realtime","video","video-call","webrtc"],"created_at":"2024-10-14T11:06:43.534Z","updated_at":"2025-04-05T18:06:06.090Z","avatar_url":"https://github.com/shoyu666.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open-IM-Server Call\n\n### 说明:\n```\n由于OpenIMSDK 的视频通话功能是闭源的,阻挡了想了解视频通话功能的伙伴。\n通过分析OpenIMSDK后,给出视频通话功能的原理和服务器代码。\n客户端的实现,参考livekit。\n本功能只用于学习交流。 \n\n官方 Open-IM-SDK-Core (客户端sdk的核心部分) 已经包含了音视频通信部分，\n但客户端demo是闭源的，所以客户端可以基于livekit-sdk自行实现视音频部分(参考livekit,livekit都是开源的)\n```\n### 功能:\n实现 [OpenIMSDK](https://github.com/OpenIMSDK/Open-IM-Server) 的视频通话功能。\n\n### 特点:\n跟OpenIMSDK 官方一样基于 开源的视频服务[livekit](https://livekit.io/) 实现。\n兼容 OpenIMSDK 官方的demo。\n\n\n### 原理:\nIM只做用户信息,好友管理,消息的透传等。视频通话是通过livekit实现(webrtc)。\n\n步骤\n1. A发起视频:A发送SignalReq_Invite 信令(包含房间号,被邀请人)\n2. 服务器接受信令,创建livekit的token,将token返回给发起方,同时透传发起方的消息给接受方。\n3. 接收方收到OnReceiveNewInvitation回调\n4. 接收方接受视频,向服务器发送SignalReq_Accept 信令。\n5. 服务器接受信令,创建livekit的token,将token返回给接收方,同时透传接收方的消息给接发送方。\n6. 发起方收到OnInviteeAccepted回调。\n7. 接收方和发起方通过各自的token进入视频聊天房间(此过程是见livekit/webrtc)\n\n\n### 使用说明\n[直接使用Open-IM-Server + Call 整合好的分支](https://github.com/shoyu666/Open-IM-Server)\n\n##### [安装livekit](https://docs.livekit.io/guides/getting-started/)\n```\nlinux\ncurl -sSL https://get.livekit.io | bash\nlivekit-server --dev\n\n注意：必须要有https域名和证书\n```\n\n\n##### 修改配置\n```\nrtc:\n  signalTimeout: 35\n  #livekit的服务地址\n  liveURL: wss://www.xxxx.xx:7890\n  #livekit的key(部署livekit时自定义)\n  key: xxx\n  #livekit的secret(部署livekit时自定义)\n  secret: xxx\n \n```\n##### 代码目录\n和openim service目录一致\n如:cmd\\rpc\\open_im_real_time_comm\n\n##### 运行\n运行 cmd/rpc/open_im_real_time_comm/main.go\n运行后会注册服务名为：RealTimeComm 的rpc服务。\n修改 OpenIM demo的服务器地址,发起视频通话。\n\n\n#### 问题记录\n##### 问题：missing SignalGetRooms method https://github.com/shoyu666/Open-IM-Server-Call/issues/2#issue-1399210934\n```\n解决方案：您可以使用 Open_IM-Server 老的版本\n\n原因：Open_IM-Server 源分支在 9月28号提交的代码，增加了 SignalGetRooms方法 \n[提交记录](https://github.com/OpenIMSDK/Open-IM-Server/commit/249d5e27887391253547519cd177d766e77a7f00#diff-33db5c101b755c6d95d5eb12faa1165ea82556dbe0d5d969ad73f87a6c7eceb7)\n\n目前Open_IM-Server版本  SignalGetRooms 方法实际没有用到,可能后续版本这个方法会被用到。\n\n也可以使用 Open-IM-Server + Call 整合好的分支 https://github.com/shoyu666/Open-IM-Server\n```\n\n![image](https://github.com/shoyu666/Open-IM-Server-Call/blob/7787f14fd1e1c91b488b5e3a83e058a86dd7e4bb/preview.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshoyu666%2Fopen-im-server-call","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshoyu666%2Fopen-im-server-call","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshoyu666%2Fopen-im-server-call/lists"}