Messaging/pkg/services/livekit.go
2024-06-08 20:38:03 +08:00

19 lines
338 B
Go

package services
import (
lksdk "github.com/livekit/server-sdk-go"
"github.com/spf13/viper"
)
var Lk *lksdk.RoomServiceClient
func SetupLiveKit() {
host := "https://" + viper.GetString("calling.endpoint")
Lk = lksdk.NewRoomServiceClient(
host,
viper.GetString("calling.api_key"),
viper.GetString("calling.api_secret"),
)
}