You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
Merge remote-tracking branch 'duckie-temp/main' into duckie-merge-2026-04-21
# Conflicts: # packages/communication/src/NitroMessages.ts # packages/communication/src/messages/incoming/IncomingHeader.ts # packages/communication/src/messages/outgoing/OutgoingHeader.ts
This commit is contained in:
@@ -517,4 +517,9 @@ export class OutgoingHeader
|
||||
public static SET_ACTIVE_NICK_ICON = 7017;
|
||||
public static PURCHASE_CATALOG_PREFIX = 7018;
|
||||
public static SET_DISPLAY_ORDER = 7019;
|
||||
|
||||
// YouTube Room Broadcast
|
||||
public static YOUTUBE_ROOM_PLAY = 8001;
|
||||
public static YOUTUBE_ROOM_WATCHING = 8002;
|
||||
public static YOUTUBE_ROOM_SETTINGS = 8003;
|
||||
}
|
||||
|
||||
@@ -17,3 +17,4 @@ export * from './RedeemItemClothingComposer';
|
||||
export * from './session';
|
||||
export * from './unit';
|
||||
export * from './unit/chat';
|
||||
export * from './youtube';
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class YouTubeRoomPlayComposer implements IMessageComposer<any[]>
|
||||
{
|
||||
private _data: any[];
|
||||
|
||||
constructor(videoId: string, playlist: string[])
|
||||
{
|
||||
this._data = [videoId, playlist.length, ...playlist];
|
||||
}
|
||||
|
||||
public getMessageArray() { return this._data; }
|
||||
public dispose(): void {}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class YouTubeRoomSettingsComposer implements IMessageComposer<any[]>
|
||||
{
|
||||
private _data: any[];
|
||||
|
||||
constructor(enabled: boolean)
|
||||
{
|
||||
this._data = [enabled ? 1 : 0];
|
||||
}
|
||||
|
||||
public getMessageArray() { return this._data; }
|
||||
public dispose(): void {}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class YouTubeRoomWatchingComposer implements IMessageComposer<any[]>
|
||||
{
|
||||
private _data: any[];
|
||||
|
||||
constructor(watching: boolean)
|
||||
{
|
||||
// Send as int (0/1) instead of bare boolean to avoid
|
||||
// serialization ambiguity in the Nitro wire protocol.
|
||||
this._data = [watching ? 1 : 0];
|
||||
}
|
||||
|
||||
public getMessageArray() { return this._data; }
|
||||
public dispose(): void {}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from './YouTubeRoomPlayComposer';
|
||||
export * from './YouTubeRoomSettingsComposer';
|
||||
export * from './YouTubeRoomWatchingComposer';
|
||||
Reference in New Issue
Block a user