better UX and UI on the room page
This commit is contained in:
@@ -10,6 +10,15 @@ interface RoomUser {
|
||||
userId?: number;
|
||||
}
|
||||
|
||||
interface SourceContext {
|
||||
animeId: string;
|
||||
episode: string | number;
|
||||
source: string;
|
||||
extension: string;
|
||||
server: string;
|
||||
category: string;
|
||||
}
|
||||
|
||||
export interface QueueItem {
|
||||
uid: string;
|
||||
metadata: RoomMetadata;
|
||||
@@ -23,6 +32,7 @@ interface RoomMetadata {
|
||||
episode: number;
|
||||
image?: string;
|
||||
source?: string;
|
||||
malId?: number;
|
||||
}
|
||||
|
||||
interface RoomData {
|
||||
@@ -38,6 +48,7 @@ interface RoomData {
|
||||
videoData?: any;
|
||||
currentTime: number;
|
||||
isPlaying: boolean;
|
||||
context?: SourceContext;
|
||||
} | null;
|
||||
password?: string;
|
||||
metadata?: RoomMetadata | null;
|
||||
@@ -168,7 +179,10 @@ export function updateRoomVideo(roomId: string, videoData: any): boolean {
|
||||
const room = rooms.get(roomId);
|
||||
if (!room) return false;
|
||||
|
||||
room.currentVideo = videoData;
|
||||
room.currentVideo = {
|
||||
...room.currentVideo,
|
||||
...videoData
|
||||
};
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user