mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-22 15:40:52 +01:00
Co-authored-by: Bill <billsonnn@users.noreply.github.com>
This commit is contained in:
parent
53ab155f9c
commit
ef7cef6056
File diff suppressed because one or more lines are too long
@ -335,6 +335,7 @@ export class IncomingHeader
|
||||
public static CAMERA_PUBLISH_STATUS = 2057;
|
||||
public static CAMERA_PURCHASE_OK = 2783;
|
||||
public static CAMERA_STORAGE_URL = 3696;
|
||||
public static CAMERA_SNAPSHOT = 463;
|
||||
public static COMPETITION_STATUS = 133;
|
||||
public static INIT_CAMERA = 3878;
|
||||
public static THUMBNAIL_STATUS = 3595;
|
||||
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../api';
|
||||
import { MessageEvent } from '../../../../../events';
|
||||
import { CameraSnapshotMessageParser } from '../../parser';
|
||||
|
||||
export class CameraSnapshotMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CameraSnapshotMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CameraSnapshotMessageParser
|
||||
{
|
||||
return this.parser as CameraSnapshotMessageParser;
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
export * from './CameraPublishStatusMessageEvent';
|
||||
export * from './CameraPurchaseOKMessageEvent';
|
||||
export * from './CameraSnapshotMessageEvent';
|
||||
export * from './CameraStorageUrlMessageEvent';
|
||||
export * from './CompetitionStatusMessageEvent';
|
||||
export * from './InitCameraMessageEvent';
|
||||
|
@ -0,0 +1,35 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||
|
||||
export class CameraSnapshotMessageParser implements IMessageParser
|
||||
{
|
||||
private _roomType: string;
|
||||
private _roomId: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._roomType = null;
|
||||
this._roomId = -1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._roomType = wrapper.readString();
|
||||
this._roomId = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get roomType(): string
|
||||
{
|
||||
return this._roomType;
|
||||
}
|
||||
|
||||
public get roomId(): number
|
||||
{
|
||||
return this._roomId;
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
export * from './CameraPublishStatusMessageParser';
|
||||
export * from './CameraPurchaseOKMessageParser';
|
||||
export * from './CameraSnapshotMessageParser';
|
||||
export * from './CameraStorageUrlMessageParser';
|
||||
export * from './CompetitionStatusMessageParser';
|
||||
export * from './InitCameraMessageParser';
|
||||
|
Loading…
Reference in New Issue
Block a user