mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-06-23 01:18:39 +08:00
音视频通话
This commit is contained in:
parent
c074921734
commit
f64dfe2e64
@ -17,11 +17,10 @@ prometheus:
|
||||
ports: [ 12400 ]
|
||||
|
||||
liveKit:
|
||||
# LiveKit server address reachable from the RTC service (internal/backend address)
|
||||
# When deployed via docker-compose, use the service name 'livekit'
|
||||
internalAddress: http://livekit:7880
|
||||
# LiveKit server address reachable from clients (external/public address)
|
||||
# Production should use wss://livekit.example.com with TLS
|
||||
# RTC 进程访问 LiveKit HTTP API(CreateRoom 等)。本机跑 openim-rpc-rtc、LiveKit 映射 7880 时用 127.0.0.1。
|
||||
# 与 livekit 容器同 Docker 网络时用 http://livekit:7880。也可用环境变量 OPENIM_LIVEKIT_INTERNAL_ADDRESS 覆盖。
|
||||
internalAddress: http://127.0.0.1:7880
|
||||
# 下发给客户端的 WebSocket(liveURL)。真机填本机局域网 IP;也可用 OPENIM_LIVEKIT_EXTERNAL_ADDRESS 覆盖。
|
||||
externalAddress: ws://192.168.1.91:7880
|
||||
# LiveKit API key (configured in your LiveKit server)
|
||||
apiKey: devkey
|
||||
|
||||
6
go.mod
6
go.mod
@ -2,6 +2,10 @@ module github.com/openimsdk/open-im-server/v3
|
||||
|
||||
go 1.25.0
|
||||
|
||||
replace github.com/openimsdk/tools => ../tools
|
||||
|
||||
replace github.com/openimsdk/protocol => ./protocol
|
||||
|
||||
require (
|
||||
firebase.google.com/go/v4 v4.14.1
|
||||
github.com/dtm-labs/rockscache v0.1.1
|
||||
@ -272,5 +276,3 @@ require (
|
||||
golang.org/x/crypto v0.48.0 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/openimsdk/protocol => ./protocol
|
||||
|
||||
2
go.sum
2
go.sum
@ -451,8 +451,6 @@ github.com/opencontainers/runc v1.3.3 h1:qlmBbbhu+yY0QM7jqfuat7M1H3/iXjju3VkP9lk
|
||||
github.com/opencontainers/runc v1.3.3/go.mod h1:D7rL72gfWxVs9cJ2/AayxB0Hlvn9g0gaF1R7uunumSI=
|
||||
github.com/openimsdk/gomake v0.0.17 h1:q8haP48VOH45WhJRiLj1YSBJyUFJqD8CTedH65i1YH8=
|
||||
github.com/openimsdk/gomake v0.0.17/go.mod h1:nnjS8yCtrPJAt1knMbyPiUwCH2gpyBzj/EZAONfUOXg=
|
||||
github.com/openimsdk/tools v0.0.50-alpha.113 h1:rhLWaSJuhjgJFNVzmpChLCG7dPXS0+bte+CPI0008Us=
|
||||
github.com/openimsdk/tools v0.0.50-alpha.113/go.mod h1:x9i/e+WJFW4tocy6RNJQ9NofQiP3KJ1Y576/06TqOG4=
|
||||
github.com/ory/dockertest/v3 v3.12.0 h1:3oV9d0sDzlSQfHtIaB5k6ghUCVMVLpAY8hwrqoCyRCw=
|
||||
github.com/ory/dockertest/v3 v3.12.0/go.mod h1:aKNDTva3cp8dwOWwb9cWuX84aH5akkxXRvO7KCwWVjE=
|
||||
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
|
||||
|
||||
@ -278,7 +278,7 @@ func (och *OnlineHistoryRedisConsumerHandler) handleMsg(ctx context.Context, key
|
||||
return
|
||||
}
|
||||
|
||||
log.ZDebug(ctx, "handleMsg", "BatchInsertChat2Cache", "lastSeq", lastSeq, "isNewConversation", isNewConversation, "userSeqMap", userSeqMap)
|
||||
log.ZDebug(ctx, "handleMsg", "lastSeq", lastSeq, "isNewConversation", isNewConversation, "userSeqMap", userSeqMap)
|
||||
|
||||
err = och.msgTransferDatabase.SetHasReadSeqs(ctx, conversationID, userSeqMap)
|
||||
if err != nil {
|
||||
@ -302,7 +302,7 @@ func (och *OnlineHistoryRedisConsumerHandler) handleMsg(ctx context.Context, key
|
||||
log.ZWarn(ctx, "get group member ids error", err, "conversationID",
|
||||
conversationID)
|
||||
} else {
|
||||
log.ZDebug(ctx, "handleMsg", "GetGroupMemberIDs", "userIDs", userIDs)
|
||||
log.ZDebug(ctx, "handleMsg GetGroupMemberIDs", "conversationID", conversationID, "userIDs", userIDs)
|
||||
|
||||
if err := och.conversationClient.CreateGroupChatConversations(ctx, msg.GroupID, userIDs); err != nil {
|
||||
log.ZWarn(ctx, "single chat first create conversation error", err,
|
||||
@ -332,10 +332,10 @@ func (och *OnlineHistoryRedisConsumerHandler) handleMsg(ctx context.Context, key
|
||||
log.ZError(ctx, "Msg To MongoDB MQ error", err, "conversationID",
|
||||
conversationID, "storageList", storageMessageList, "lastSeq", lastSeq)
|
||||
}
|
||||
log.ZDebug(ctx, "handleMsg", "MsgToMongoMQ", "conversationID", conversationID, "storageList", len(storageList), "lastSeq", lastSeq, "key", key)
|
||||
log.ZDebug(ctx, "handleMsg to MsgToMongoMQ", "conversationID", conversationID, "storageList", len(storageList), "lastSeq", lastSeq, "key", key)
|
||||
|
||||
och.toPushTopic(ctx, key, conversationID, storageList)
|
||||
log.ZDebug(ctx, "handleMsg", "toPushTopic", "conversationID", conversationID, "storageList", len(storageList), "key", key)
|
||||
log.ZDebug(ctx, "handleMsg to toPushTopic", "conversationID", conversationID, "storageList", len(storageList), "key", key)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ func (s *rtcServer) SignalMessageAssemble(ctx context.Context, req *rtc.SignalMe
|
||||
)
|
||||
switch payload := req.SignalReq.Payload.(type) {
|
||||
case *rtc.SignalReq_Invite:
|
||||
log.ZDebug(ctx, "SignalMessageAssemble", "handleInvite", "payload", payload)
|
||||
log.ZInfo(ctx, "SignalMessageAssemble", "payload", payload.Invite)
|
||||
r, err := s.handleInvite(ctx, payload.Invite, req.SignalReq)
|
||||
resp.Payload = &rtc.SignalResp_Invite{Invite: r}
|
||||
respErr = err
|
||||
@ -116,6 +116,7 @@ func (s *rtcServer) handleInvite(ctx context.Context, req *rtc.SignalInviteReq,
|
||||
|
||||
content := marshalSignalReq(signalReq)
|
||||
for _, inviteeID := range inv.InviteeUserIDList {
|
||||
log.ZInfo(ctx, "sendSignalingNotification to invitee", "sendID", req.UserID, "recvID", inviteeID)
|
||||
if err := s.sendSignalingNotification(ctx, req.UserID, inviteeID, int32(constant.SingleChatType), req.OfflinePushInfo, content); err != nil {
|
||||
log.ZWarn(ctx, "sendSignalingNotification to invitee failed", err, "inviteeID", inviteeID)
|
||||
}
|
||||
@ -465,8 +466,15 @@ func (s *rtcServer) sendSignalingNotification(ctx context.Context, sendID, recvI
|
||||
if offlinePush != nil {
|
||||
msgData.OfflinePushInfo = offlinePush
|
||||
}
|
||||
|
||||
_, err := s.msgClient.MsgClient.SendMsg(ctx, &pbmsg.SendMsgReq{MsgData: msgData})
|
||||
return err
|
||||
if err != nil {
|
||||
log.ZError(ctx, "sendSignalingNotification", err, "msgdata", msgData)
|
||||
return err
|
||||
}
|
||||
log.ZInfo(ctx, "sendSignalingNotification", "msgData", msgData)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// sendCustomSignalNotification sends a CustomSignalNotification (1605) to a user.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user