You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 15:36:18 +00:00
🆙 Added Youtube Brtoadcast
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
+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 {}
|
||||
}
|
||||
+2
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user