Skip to content

Commit

Permalink
feat: 完善
Browse files Browse the repository at this point in the history
  • Loading branch information
galaxy-s10 committed Aug 13, 2023
1 parent 8d71837 commit c40bf16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
5 changes: 5 additions & 0 deletions src/config/websocket/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ export const connectWebSocket = (server) => {
return;
}
const roomId = userLiveRoomInfo.live_room_id!;
liveRoomService.update({
id: roomId,
cover_img: data.data.cover_img,
name: data.data.name,
});
prettierInfoLog({
msg: '收到主播开始直播',
socketId: socket.id,
Expand Down
11 changes: 5 additions & 6 deletions src/interface-ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ export type WsRoomNoLiveType = IWsFormat<{
live_room: ILiveRoom;
}>;

export type WsStartLiveType = IWsFormat<{
cover_img: string;
name: string;
}>;

export type WsJoinType = IWsFormat<{
socket_id: string;
live_room: ILiveRoom;
Expand All @@ -57,12 +62,6 @@ export type WsLeavedType = IWsFormat<{
user_info?: IUser;
}>;

export type WsStartLiveType = IWsFormat<{
socket_id: string;
user_info: IUser;
data: any;
}>;

export interface IRoomLiving {
live_room: ILiveRoom;
}
Expand Down

0 comments on commit c40bf16

Please sign in to comment.