import { IResult } from "./lib/ua-parser"; import { LogLevel } from "./config"; import { TrackDirection, TrackKind } from "./domain/track"; export interface EventForwarder { events: AWEvent[]; lastCoreEventTimestamp: number; enqueueEvent(event: AWEvent, config?: { last?: boolean; }): void; isIdle(): boolean; setIdle(): void; } export declare enum EventType { APP_VISIBILITY_CHANGE = "app_visibility_change", RECORDING_STARTED = "recording_started", RECORDING_UPDATED = "recording_updated", RECORDING_ENDED = "recording_ended", CONNECTION_CREATED = "conn_created", CONNECTION_STATE_CHANGE = "conn_state_change", CONNECTION_SIGNALING_STATE_CHANGE = "conn_signaling_state_change", CONNECTION_ICE_STATE_CHANGE = "conn_ice_state_change", CONNECTION_ICE_GATHERING_STATE_CHANGE = "conn_ice_gathering_state_change", CONNECTION_ICE_CANDIDATE_ERROR = "conn_ice_candidate_error", MEDIA_REQUESTED = "media_requested", MEDIA_ACQUIRED = "media_acquired", MEDIA_ERROR = "media_error", STATS = "stats", TRACK_ADDED = "track_added", TRACK_ENDED = "track_ended", TRACK_UPDATED = "track_updated", USER_FEEDBACK = "user_feedback", DEVICE_STATE = "device_state", IDENTIFIED_CONNECTION = "identified_conn", IDENTIFIED_TRACK = "identified_track", IDENTIFIED_DATA_TRACK = "identified_data_track", LOG = "log", DATA_TRACK_ADDED = "data_track_added", DATA_TRACK_UPDATED = "data_track_updated", DATA_TRACK_ERROR = "data_track_error" } declare type AppVisibilityChangeData = { visible: boolean; }; export declare type StateSnapshot = { connections: ConnectionCreatedData[]; tracks: TrackAddedData[]; dataTracks: DataTrackAddedData[]; devices: Device[]; }; declare type RecordingStartedData = { token: string; timezone: string; platform: IResult; snapshot: StateSnapshot; }; export declare enum RecordingEndedReason { USER_CHANGE = "user_change", CLOSED = "closed", NORMAL = "normal" } declare type RecordingEndedData = { reason: RecordingEndedReason; }; declare type RecordingUpdatedData = Record; declare type ConnectionCreatedData = { id: string; connectionState: string; config: RTCConfiguration; }; declare type ConnectionStateChangeData = { id: string; connectionState: string; }; declare type ConnectionSignalingStateChangeData = { id: string; signalingState: string; }; declare type ConnectionIceStateChangeData = { id: string; iceConnectionState: string; }; declare type ConnectionIceGatheringStateChangeData = { id: string; iceGatheringState: string; }; declare type ConnectionIceCandidateErrorData = { id: string; address: string | null; errorCode: number; errorText: string; port: number | null; url: string; }; declare type MediaRequestType = "user" | "display"; declare type MediaRequestedData = { requestId: string; type: MediaRequestType; args: unknown[]; }; declare type MediaAcquiredData = { requestId: string; type: MediaRequestType; }; declare type MediaRequestErrorData = { requestId: string; type: MediaRequestType; name: string; message: string; }; declare type StatsData = { entities: { entityType: string; entityId: string; entitySubId?: string; stats: { key: string; timestamp: number; value?: string | number | boolean; min?: number; max?: number; avg?: number; }[]; }[]; }; declare type TrackMutableData = { enabled: boolean; transmitsData: boolean; playsLocally: boolean; deviceId?: string; }; declare type TrackAddedData = TrackMutableData & { id: string; connectionId: string; direction: TrackDirection; kind: TrackKind; mid: string | null; }; declare type TrackUpdatedData = { id: string; new: TrackMutableData; old: TrackMutableData; }; declare type TrackEndedData = { id: string; }; declare type UserFeedbackData = { score: number; description?: string; }; declare type Device = { deviceId: string; groupId: string; kind: string; label: string; }; declare type DeviceStateData = { devices: Device[]; }; declare type IdentifiedConnectionData = { id: string; participantId: string; conferenceId: string; conferenceName: string; }; declare type IdentifiedTrackData = { id: string; participantId: string; }; declare type IdentifiedDataTrackData = { id: string; platformId: string; }; declare type LogData = { level: LogLevel; serializedArgs: string; stack?: string; }; declare type DataTrackBaseData = { id: string; connectionId: string; }; declare type DataTrackMutableData = { state: "connecting" | "open" | "closing" | "closed"; agentId: number | null; }; declare type DataTrackAddedData = DataTrackBaseData & DataTrackMutableData & { label: string; maxPacketLifeTime: number | null; maxRetransmits: number | null; negotiated: boolean; ordered: boolean; origin: "local" | "remote"; }; declare type DataTrackUpdatedData = DataTrackBaseData & { old: DataTrackMutableData; new: DataTrackMutableData; }; declare type DataTrackErrorData = DataTrackBaseData & { message: string; name: string; errorDetail: string; receivedAlert: number | null; sctpCauseCode: number | null; sdpLineNumber: number | null; sentAlert: number | null; }; export declare type EventData = AppVisibilityChangeData | RecordingStartedData | RecordingUpdatedData | RecordingEndedData | ConnectionCreatedData | ConnectionStateChangeData | ConnectionIceCandidateErrorData | MediaRequestedData | MediaAcquiredData | MediaRequestErrorData | TrackEndedData | TrackAddedData | TrackUpdatedData | TrackEndedData | UserFeedbackData | DeviceStateData | ConnectionSignalingStateChangeData | ConnectionIceStateChangeData | ConnectionIceGatheringStateChangeData | IdentifiedConnectionData | IdentifiedTrackData | IdentifiedDataTrackData | LogData | DataTrackAddedData | DataTrackUpdatedData | DataTrackErrorData; export interface AWEvent { type: EventType; data: EventData; } export interface AWEventWithCoreCheck extends AWEvent { isCore(): boolean; } export declare class AppVisibilityChange implements AWEventWithCoreCheck { type: EventType; data: AppVisibilityChangeData; constructor(data: AppVisibilityChangeData); isCore(): boolean; } export declare class RecordingStarted implements AWEventWithCoreCheck { type: EventType; data: RecordingStartedData; constructor(data: RecordingStartedData); isCore(): boolean; } export declare class RecordingUpdated implements AWEventWithCoreCheck { type: EventType; data: RecordingUpdatedData; constructor(data: RecordingUpdatedData); isCore(): boolean; } export declare class RecordingEnded implements AWEventWithCoreCheck { static Reason: typeof RecordingEndedReason; type: EventType; data: RecordingEndedData; constructor(data: RecordingEndedData); isCore(): boolean; } export declare class ConnectionCreated implements AWEventWithCoreCheck { type: EventType; data: ConnectionCreatedData; constructor(data: ConnectionCreatedData); isCore(): boolean; } export declare class ConnectionStateChange implements AWEventWithCoreCheck { type: EventType; data: ConnectionStateChangeData; constructor(data: ConnectionStateChangeData); isCore(): boolean; } export declare class ConnectionIceCandidateError implements AWEventWithCoreCheck { type: EventType; data: ConnectionIceCandidateErrorData; constructor(data: ConnectionIceCandidateErrorData); isCore(): boolean; } export declare class MediaRequested implements AWEventWithCoreCheck { type: EventType; data: MediaRequestedData; constructor(data: MediaRequestedData); isCore(): boolean; } export declare class MediaAcquired implements AWEventWithCoreCheck { type: EventType; data: MediaAcquiredData; constructor(data: MediaAcquiredData); isCore(): boolean; } export declare class MediaRequestError implements AWEventWithCoreCheck { type: EventType; data: MediaRequestErrorData; constructor(data: MediaRequestErrorData); isCore(): boolean; } export declare class Stats implements AWEventWithCoreCheck { type: EventType; data: StatsData; constructor(data: StatsData); isCore(): boolean; } export declare class TrackAdded implements AWEventWithCoreCheck { type: EventType; data: TrackAddedData; constructor(data: TrackAddedData); isCore(): boolean; } export declare class TrackUpdated implements AWEventWithCoreCheck { type: EventType; data: TrackUpdatedData; constructor(data: TrackUpdatedData); isCore(): boolean; } export declare class TrackEnded implements AWEventWithCoreCheck { type: EventType; data: TrackEndedData; constructor(data: TrackEndedData); isCore(): boolean; } export declare class UserFeedback implements AWEventWithCoreCheck { type: EventType; data: UserFeedbackData; constructor(data: UserFeedbackData); isCore(): boolean; } export declare class DeviceState implements AWEventWithCoreCheck { type: EventType; data: DeviceStateData; constructor(data: DeviceStateData); isCore(): boolean; } export declare class ConnectionSignalingStateChange implements AWEventWithCoreCheck { type: EventType; data: ConnectionSignalingStateChangeData; constructor(data: ConnectionSignalingStateChangeData); isCore(): boolean; } export declare class ConnectionIceStateChange implements AWEventWithCoreCheck { type: EventType; data: ConnectionIceStateChangeData; constructor(data: ConnectionIceStateChangeData); isCore(): boolean; } export declare class ConnectionIceGatheringStateChange implements AWEventWithCoreCheck { type: EventType; data: ConnectionIceGatheringStateChangeData; constructor(data: ConnectionIceGatheringStateChangeData); isCore(): boolean; } export declare class IdentifiedConnection implements AWEventWithCoreCheck { type: EventType; data: IdentifiedConnectionData; constructor(data: IdentifiedConnectionData); isCore(): boolean; } export declare class IdentifiedTrack implements AWEventWithCoreCheck { type: EventType; data: IdentifiedTrackData; constructor(data: IdentifiedTrackData); isCore(): boolean; } export declare class IdentifiedDataTrack implements AWEventWithCoreCheck { type: EventType; data: IdentifiedDataTrackData; constructor(data: IdentifiedDataTrackData); isCore(): boolean; } export declare class Log implements AWEventWithCoreCheck { type: EventType; data: LogData; constructor(data: LogData); isCore(): boolean; } export declare class DataTrackAdded implements AWEventWithCoreCheck { type: EventType; data: DataTrackAddedData; constructor(data: DataTrackAddedData); isCore(): boolean; } export declare class DataTrackUpdated implements AWEventWithCoreCheck { type: EventType; data: DataTrackUpdatedData; constructor(data: DataTrackUpdatedData); isCore(): boolean; } export declare class DataTrackError implements AWEventWithCoreCheck { type: EventType; data: DataTrackErrorData; constructor(data: DataTrackErrorData); isCore(): boolean; } export {};