parent
e6451179d6
commit
4b9412f685
@ -0,0 +1,17 @@
|
||||
port: 7880
|
||||
rtc:
|
||||
tcp_port: 7881
|
||||
port_range_start: 50000
|
||||
port_range_end: 60000
|
||||
use_external_ip: true
|
||||
|
||||
redis:
|
||||
address: redis:6379
|
||||
password: openIM123
|
||||
|
||||
# LiveKit 要求 API secret 至少 32 字符;生产环境请替换为强随机串并与 openim-rpc-rtc.yml 中 apiSecret 一致
|
||||
keys:
|
||||
devkey: openim-livekit-default-secret-32chars-min
|
||||
|
||||
logging:
|
||||
level: info
|
||||
@ -0,0 +1,65 @@
|
||||
// Copyright © 2024 OpenIM. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/openimsdk/protocol/rtc"
|
||||
"github.com/openimsdk/tools/a2r"
|
||||
)
|
||||
|
||||
type RtcApi struct {
|
||||
Client rtc.RtcServiceClient
|
||||
}
|
||||
|
||||
func NewRtcApi(client rtc.RtcServiceClient) RtcApi {
|
||||
return RtcApi{Client: client}
|
||||
}
|
||||
|
||||
func (o *RtcApi) SignalMessageAssemble(c *gin.Context) {
|
||||
a2r.Call(c, rtc.RtcServiceClient.SignalMessageAssemble, o.Client)
|
||||
}
|
||||
|
||||
func (o *RtcApi) SignalGetRoomByGroupID(c *gin.Context) {
|
||||
a2r.Call(c, rtc.RtcServiceClient.SignalGetRoomByGroupID, o.Client)
|
||||
}
|
||||
|
||||
func (o *RtcApi) SignalGetTokenByRoomID(c *gin.Context) {
|
||||
a2r.Call(c, rtc.RtcServiceClient.SignalGetTokenByRoomID, o.Client)
|
||||
}
|
||||
|
||||
func (o *RtcApi) SignalGetRooms(c *gin.Context) {
|
||||
a2r.Call(c, rtc.RtcServiceClient.SignalGetRooms, o.Client)
|
||||
}
|
||||
|
||||
func (o *RtcApi) GetSignalInvitationInfo(c *gin.Context) {
|
||||
a2r.Call(c, rtc.RtcServiceClient.GetSignalInvitationInfo, o.Client)
|
||||
}
|
||||
|
||||
func (o *RtcApi) GetSignalInvitationInfoStartApp(c *gin.Context) {
|
||||
a2r.Call(c, rtc.RtcServiceClient.GetSignalInvitationInfoStartApp, o.Client)
|
||||
}
|
||||
|
||||
func (o *RtcApi) SignalSendCustomSignal(c *gin.Context) {
|
||||
a2r.Call(c, rtc.RtcServiceClient.SignalSendCustomSignal, o.Client)
|
||||
}
|
||||
|
||||
func (o *RtcApi) GetSignalInvitationRecords(c *gin.Context) {
|
||||
a2r.Call(c, rtc.RtcServiceClient.GetSignalInvitationRecords, o.Client)
|
||||
}
|
||||
|
||||
func (o *RtcApi) DeleteSignalRecords(c *gin.Context) {
|
||||
a2r.Call(c, rtc.RtcServiceClient.DeleteSignalRecords, o.Client)
|
||||
}
|
||||
Loading…
Reference in new issue