This commit is contained in:
aynakeya
2024-04-10 00:42:33 -07:00
parent 8d73a3c284
commit f926f15606
145 changed files with 2852 additions and 4296 deletions

View File

@@ -1,16 +1,73 @@
package events
import (
"AynaLivePlayer/common/event"
"AynaLivePlayer/core/adapter"
"AynaLivePlayer/core/model"
liveroomsdk "github.com/AynaLivePlayer/liveroom-sdk"
)
const (
LiveRoomStatusChange event.EventId = "liveclient.status.change"
LiveRoomMessageReceive event.EventId = "liveclient.message.receive"
)
//const (
// LiveRoomStatusChange event.EventId = "liveclient.status.change"
// LiveRoomMessageReceive event.EventId = "liveclient.message.receive"
//)
//
//type StatusChangeEvent struct {
// Connected bool
// Client adapter.LiveClient
//}
type StatusChangeEvent struct {
Connected bool
Client adapter.LiveClient
const LiveRoomAddCmd = "cmd.liveroom.add"
type LiveRoomAddCmdEvent struct {
Title string
Provider string
RoomKey string
}
const LiveRoomProviderUpdate = "update.liveroom.provider"
type LiveRoomProviderUpdateEvent struct {
Providers []model.LiveRoomProviderInfo
}
const LiveRoomRemoveCmd = "cmd.liveroom.remove"
type LiveRoomRemoveCmdEvent struct {
Identifier string
}
const LiveRoomRoomsUpdate = "update.liveroom.rooms"
type LiveRoomRoomsUpdateEvent struct {
Rooms []model.LiveRoom
}
const LiveRoomStatusUpdate = "update.liveroom.status"
type LiveRoomStatusUpdateEvent struct {
Room model.LiveRoom
}
const LiveRoomConfigChangeCmd = "cmd.liveroom.config.change"
type LiveRoomConfigChangeCmdEvent struct {
Identifier string
Config model.LiveRoomConfig
}
const LiveRoomOperationCmd = "cmd.liveroom.operation"
type LiveRoomOperationCmdEvent struct {
Identifier string
SetConnect bool // connect or disconnect
}
const LiveRoomOperationFinish = "update.liveroom.operation"
type LiveRoomOperationFinishEvent struct {
}
const LiveRoomMessageReceive = "update.liveroom.message"
type LiveRoomMessageReceiveEvent struct {
Message *liveroomsdk.Message
}