🆙 Added Youtube Brtoadcast

This commit is contained in:
duckietm
2026-04-10 11:22:45 +02:00
parent a92f2f0603
commit 37f817a098
11 changed files with 64 additions and 1 deletions
@@ -507,4 +507,5 @@ export class OutgoingHeader
// YouTube Room Broadcast
public static YOUTUBE_ROOM_PLAY = 8001;
public static YOUTUBE_ROOM_WATCHING = 8002;
public static YOUTUBE_ROOM_SETTINGS = 8003;
}
@@ -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 {}
}
@@ -6,6 +6,8 @@ export class YouTubeRoomWatchingComposer implements IMessageComposer<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];
}
@@ -1,2 +1,3 @@
export * from './YouTubeRoomPlayComposer';
export * from './YouTubeRoomSettingsComposer';
export * from './YouTubeRoomWatchingComposer';