@livedigital/client 2.6.0 → 2.7.1-wid-bug-fixes.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine/Logger.d.ts +6 -5
- package/dist/engine/Peer.d.ts +1 -0
- package/dist/engine/index.d.ts +3 -1
- package/dist/engine/wid/WIDRTCPeerConnection.d.ts +4 -0
- package/dist/engine/wid/WebRTCIssueDetector.d.ts +18 -0
- package/dist/engine/wid/WebRTCIssueEmitter.d.ts +9 -0
- package/dist/engine/wid/detectors/AvailableOutgoingBitrateIssueDetector.d.ts +7 -0
- package/dist/engine/wid/detectors/FramesDroppedIssueDetector.d.ts +8 -0
- package/dist/engine/wid/detectors/FramesEncodedSentIssueDetector.d.ts +8 -0
- package/dist/engine/wid/detectors/NetworkIssueDetector.d.ts +8 -0
- package/dist/engine/wid/detectors/NetworkMediaSyncIssueDetector.d.ts +8 -0
- package/dist/engine/wid/detectors/QualityLimitationsIssueDetector.d.ts +8 -0
- package/dist/engine/wid/types.d.ts +39 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +1 -1
- package/dist/index.js +2 -2
- package/dist/types/common.d.ts +1 -0
- package/package.json +2 -1
- package/src/engine/Logger.ts +19 -7
- package/src/engine/Peer.ts +7 -0
- package/src/engine/index.ts +23 -4
- package/src/engine/wid/WIDRTCPeerConnection.ts +13 -0
- package/src/engine/wid/WebRTCIssueDetector.ts +110 -0
- package/src/engine/wid/WebRTCIssueEmitter.ts +9 -0
- package/src/engine/wid/detectors/AvailableOutgoingBitrateIssueDetector.ts +32 -0
- package/src/engine/wid/detectors/FramesDroppedIssueDetector.ts +68 -0
- package/src/engine/wid/detectors/FramesEncodedSentIssueDetector.ts +73 -0
- package/src/engine/wid/detectors/NetworkIssueDetector.ts +95 -0
- package/src/engine/wid/detectors/NetworkMediaSyncIssueDetector.ts +60 -0
- package/src/engine/wid/detectors/QualityLimitationsIssueDetector.ts +67 -0
- package/src/engine/wid/types.ts +48 -0
- package/src/index.ts +4 -1
- package/src/types/common.ts +2 -0
package/dist/engine/Logger.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { LogMessageHandler } from '../types/common';
|
|
2
2
|
declare class Logger {
|
|
3
3
|
private readonly _debug;
|
|
4
4
|
private readonly _warn;
|
|
5
5
|
private readonly _error;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
private readonly onLogMessage;
|
|
7
|
+
constructor(prefix?: string, onLogMessage?: LogMessageHandler);
|
|
8
|
+
debug(msg: any, ...meta: any[]): void;
|
|
9
|
+
warn(msg: any, ...meta: any[]): void;
|
|
10
|
+
error(msg: any, ...meta: any[]): void;
|
|
10
11
|
}
|
|
11
12
|
export default Logger;
|
package/dist/engine/Peer.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ declare class Peer {
|
|
|
38
38
|
private readonly logger;
|
|
39
39
|
private incomingConnectionQuality;
|
|
40
40
|
private outgoingConnectionQuality;
|
|
41
|
+
private overallConnectionQuality;
|
|
41
42
|
constructor({ id, channelIds, appId, loginDate, producers, engine, appData, uid, role, }: PeerConstructor);
|
|
42
43
|
get observer(): EnhancedEventEmitter;
|
|
43
44
|
get isMe(): boolean;
|
package/dist/engine/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateCameraVideoTrackOptions, CreateMicrophoneAudioTrackOptions, CreateScreenMediaOptions, JoinChannelParams, PeerResponse, Role, Track } from '../types/common';
|
|
1
|
+
import { CreateCameraVideoTrackOptions, CreateMicrophoneAudioTrackOptions, CreateScreenMediaOptions, JoinChannelParams, PeerResponse, Role, Track, LogMessageHandler } from '../types/common';
|
|
2
2
|
import EnhancedEventEmitter from '../EnhancedEventEmitter';
|
|
3
3
|
import System from './system';
|
|
4
4
|
import Peer from './Peer';
|
|
@@ -7,6 +7,7 @@ import Media from './media';
|
|
|
7
7
|
declare type EngineParams = {
|
|
8
8
|
clientEventEmitter: EnhancedEventEmitter;
|
|
9
9
|
network: NetworkParams;
|
|
10
|
+
onLogMessage?: LogMessageHandler;
|
|
10
11
|
};
|
|
11
12
|
declare class Engine {
|
|
12
13
|
system: System;
|
|
@@ -22,6 +23,7 @@ declare class Engine {
|
|
|
22
23
|
private channel?;
|
|
23
24
|
private isRoomJoining;
|
|
24
25
|
private logger;
|
|
26
|
+
private webRtcIssueDetector;
|
|
25
27
|
constructor(params: EngineParams);
|
|
26
28
|
private initialize;
|
|
27
29
|
release(): Promise<void>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WebRTCIssueEmitter } from './WebRTCIssueEmitter';
|
|
2
|
+
import { WebRTCIssueDetectorConstructorParams } from './types';
|
|
3
|
+
declare class WebRTCIssueDetector {
|
|
4
|
+
#private;
|
|
5
|
+
private readonly webrtcStats;
|
|
6
|
+
private readonly webrtcStatsPeerId;
|
|
7
|
+
private readonly getStatsInterval;
|
|
8
|
+
private readonly detectors;
|
|
9
|
+
readonly eventEmitter: WebRTCIssueEmitter;
|
|
10
|
+
constructor(params: WebRTCIssueDetectorConstructorParams);
|
|
11
|
+
watchNewPeerConnections(): void;
|
|
12
|
+
stopWatchingNewPeerConnections(): void;
|
|
13
|
+
resetWatchedPeerConnectionsList(): void;
|
|
14
|
+
handleNewPeerConnection(pc: RTCPeerConnection): void;
|
|
15
|
+
private emitIssues;
|
|
16
|
+
private detectIssues;
|
|
17
|
+
}
|
|
18
|
+
export default WebRTCIssueDetector;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
import { EventType, EventPayload, IssueDetectorResult } from './types';
|
|
4
|
+
export declare interface WebRTCIssueEmitter {
|
|
5
|
+
on(event: EventType, listener: (issues: IssueDetectorResult) => void): this;
|
|
6
|
+
emit(event: EventType, payload: EventPayload): boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class WebRTCIssueEmitter extends EventEmitter {
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WebRTCStatsEventData } from '@peermetrics/webrtc-stats';
|
|
2
|
+
import { IssueDetector, IssueDetectorResult } from '../types';
|
|
3
|
+
declare class AvailableOutgoingBitrateIssueDetector implements IssueDetector {
|
|
4
|
+
#private;
|
|
5
|
+
detect(data: WebRTCStatsEventData): IssueDetectorResult;
|
|
6
|
+
}
|
|
7
|
+
export default AvailableOutgoingBitrateIssueDetector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WebRTCStatsEventData } from '@peermetrics/webrtc-stats';
|
|
2
|
+
import { IssueDetector, IssueDetectorResult } from '../types';
|
|
3
|
+
declare class FramesDroppedIssueDetector implements IssueDetector {
|
|
4
|
+
#private;
|
|
5
|
+
detect(data: WebRTCStatsEventData): IssueDetectorResult;
|
|
6
|
+
private processData;
|
|
7
|
+
}
|
|
8
|
+
export default FramesDroppedIssueDetector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WebRTCStatsEventData } from '@peermetrics/webrtc-stats';
|
|
2
|
+
import { IssueDetector, IssueDetectorResult } from '../types';
|
|
3
|
+
declare class FramesEncodedSentIssueDetector implements IssueDetector {
|
|
4
|
+
#private;
|
|
5
|
+
detect(data: WebRTCStatsEventData): IssueDetectorResult;
|
|
6
|
+
private processData;
|
|
7
|
+
}
|
|
8
|
+
export default FramesEncodedSentIssueDetector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WebRTCStatsEventData } from '@peermetrics/webrtc-stats';
|
|
2
|
+
import { IssueDetector, IssueDetectorResult } from '../types';
|
|
3
|
+
declare class NetworkIssueDetector implements IssueDetector {
|
|
4
|
+
#private;
|
|
5
|
+
detect(data: WebRTCStatsEventData): IssueDetectorResult;
|
|
6
|
+
private processData;
|
|
7
|
+
}
|
|
8
|
+
export default NetworkIssueDetector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WebRTCStatsEventData } from '@peermetrics/webrtc-stats';
|
|
2
|
+
import { IssueDetector, IssueDetectorResult } from '../types';
|
|
3
|
+
declare class NetworkMediaSyncIssueDetector implements IssueDetector {
|
|
4
|
+
#private;
|
|
5
|
+
detect(data: WebRTCStatsEventData): IssueDetectorResult;
|
|
6
|
+
private processData;
|
|
7
|
+
}
|
|
8
|
+
export default NetworkMediaSyncIssueDetector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WebRTCStatsEventData } from '@peermetrics/webrtc-stats';
|
|
2
|
+
import { IssueDetector, IssueDetectorResult } from '../types';
|
|
3
|
+
declare class QualityLimitationsIssueDetector implements IssueDetector {
|
|
4
|
+
#private;
|
|
5
|
+
detect(data: WebRTCStatsEventData): IssueDetectorResult;
|
|
6
|
+
private processData;
|
|
7
|
+
}
|
|
8
|
+
export default QualityLimitationsIssueDetector;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { WebRTCStatsEventData } from '@peermetrics/webrtc-stats';
|
|
2
|
+
export interface WIDWindow {
|
|
3
|
+
wid: {
|
|
4
|
+
handleNewPeerConnection(pc: RTCPeerConnection): void;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export declare type IssueDetectorResult = IssuePayload[];
|
|
8
|
+
export interface IssueDetector {
|
|
9
|
+
detect(data: WebRTCStatsEventData): IssueDetectorResult;
|
|
10
|
+
}
|
|
11
|
+
export declare enum EventType {
|
|
12
|
+
Issue = "issue"
|
|
13
|
+
}
|
|
14
|
+
export declare type EventPayload = IssueDetectorResult;
|
|
15
|
+
export declare type WebRTCIssueDetectorConstructorParams = {
|
|
16
|
+
onIssue?: (payload: IssueDetectorResult) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare enum IssueType {
|
|
19
|
+
Network = "network",
|
|
20
|
+
CPU = "cpu",
|
|
21
|
+
Server = "server"
|
|
22
|
+
}
|
|
23
|
+
export declare enum IssueReason {
|
|
24
|
+
NetworkQuality = "network-quality",
|
|
25
|
+
NetworkMediaLatency = "network-media-latency",
|
|
26
|
+
NetworkMediaSyncFailure = "network-media-sync-failure",
|
|
27
|
+
OutboundNetworkThroughput = "outbound-network-throughput",
|
|
28
|
+
InboundNetworkThroughput = "inbound-network-throughput",
|
|
29
|
+
EncoderCPUThrottling = "encoder-cpu-throttling",
|
|
30
|
+
DecoderCPUThrottling = "decoder-cpu-throttling",
|
|
31
|
+
ServerIssue = "server-issue"
|
|
32
|
+
}
|
|
33
|
+
export declare type IssuePayload = {
|
|
34
|
+
type: IssueType;
|
|
35
|
+
reason: IssueReason;
|
|
36
|
+
ssrc?: number;
|
|
37
|
+
iceCandidate?: string;
|
|
38
|
+
debug?: string;
|
|
39
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AvailableMediaDevices, CreateCameraVideoTrackOptions, CreateMicrophoneAudioTrackOptions, CreateScreenMediaOptions, JoinChannelParams, Role, Track } from './types/common';
|
|
1
|
+
import { AvailableMediaDevices, CreateCameraVideoTrackOptions, CreateMicrophoneAudioTrackOptions, CreateScreenMediaOptions, JoinChannelParams, Role, Track, LogMessageHandler } from './types/common';
|
|
2
2
|
import EnhancedEventEmitter from './EnhancedEventEmitter';
|
|
3
3
|
import Peer from './engine/Peer';
|
|
4
4
|
import { LoadBalancerApiClientParams } from './engine/network/LoadBalancerClient';
|
|
@@ -6,6 +6,7 @@ declare type ClientParams = {
|
|
|
6
6
|
network?: {
|
|
7
7
|
loadbalancer?: LoadBalancerApiClientParams;
|
|
8
8
|
};
|
|
9
|
+
onLogMessage?: LogMessageHandler;
|
|
9
10
|
};
|
|
10
11
|
declare class Client {
|
|
11
12
|
private readonly engine;
|