@testrtc/watchrtc-sdk
Advanced tools
import "./types"; | ||
import { IEvent, IWatchRTCConfiguration, Rating } from "./interfaces"; | ||
import { IEvent, IWatchRTCConfiguration, IWatchRTCInitServices, Rating } from "./interfaces"; | ||
/** | ||
@@ -8,4 +8,5 @@ * Initialize SDK. Can be called multiple times but it will be initialized only at the first time. | ||
* @param prefixesToWrap | ||
* @param services | ||
*/ | ||
export declare const init: (watchrtcConfig?: IWatchRTCConfiguration | undefined) => void; | ||
export declare const init: (watchrtcConfig?: IWatchRTCConfiguration | undefined, services?: IWatchRTCInitServices | undefined) => void; | ||
/** | ||
@@ -50,3 +51,3 @@ * You also can use watchRTC.setConfig function to set watchRTC configuration after calling init() | ||
*/ | ||
init: (watchrtcConfig?: IWatchRTCConfiguration | undefined) => void; | ||
init: (watchrtcConfig?: IWatchRTCConfiguration | undefined, services?: IWatchRTCInitServices | undefined) => void; | ||
/** | ||
@@ -53,0 +54,0 @@ * @deprecated Tags no longer supported. Use addKeys instead |
@@ -40,1 +40,19 @@ export interface RTCPeerConnectionInformation { | ||
} | ||
export interface IHttpService { | ||
trace(url: string, projectId?: string, rtcRoomId?: string, rtcPeerId?: string, ...data: any[]): void; | ||
} | ||
export interface ISocketService { | ||
connection: WebSocket | null; | ||
wasConnected: boolean; | ||
buffer: any[]; | ||
connect: (url: string, onData: (data: any) => void, onError: (error: any) => void) => void; | ||
trace: (...data: any[]) => void; | ||
close: () => void; | ||
disableDataCollection: () => void; | ||
enableDataCollection: () => void; | ||
toggleDebug: (debug: boolean) => void; | ||
} | ||
export interface IWatchRTCInitServices { | ||
socketService?: ISocketService; | ||
httpService?: IHttpService; | ||
} |
@@ -1,2 +0,2 @@ | ||
import { IEvent, IWatchRTCConfiguration, Rating } from "./interfaces"; | ||
import { IEvent, IWatchRTCConfiguration, IWatchRTCInitServices, Rating } from "./interfaces"; | ||
/** | ||
@@ -6,4 +6,5 @@ * Initialize SDK. | ||
* @param prefixesToWrap | ||
* @param services | ||
*/ | ||
export declare const initSDK: (watchrtc: IWatchRTCConfiguration, prefixesToWrap: string[]) => void; | ||
export declare const initSDK: (watchrtc: IWatchRTCConfiguration, prefixesToWrap: string[], services?: IWatchRTCInitServices | undefined) => void; | ||
export declare const setConfig: (newWatchrtcConfig: IWatchRTCConfiguration) => void; | ||
@@ -10,0 +11,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
declare const _default: "1.30.7"; | ||
declare const _default: "1.30.9"; | ||
export default _default; |
@@ -0,5 +1,6 @@ | ||
import { IHttpService } from "./interfaces"; | ||
interface IWatchRTCHttpOptions { | ||
debug?: boolean; | ||
} | ||
export default class WatchRTCHttp { | ||
export default class WatchRTCHttp implements IHttpService { | ||
static _instance: WatchRTCHttp; | ||
@@ -6,0 +7,0 @@ private debug; |
@@ -0,9 +1,10 @@ | ||
import { ISocketService } from "./interfaces"; | ||
interface IWatchRTCSocketOptions { | ||
debug?: boolean; | ||
} | ||
export default class WatchRTCSocket { | ||
export default class WatchRTCSocket implements ISocketService { | ||
static _instance: WatchRTCSocket; | ||
connection: WebSocket | null; | ||
wasConnected: boolean; | ||
private buffer; | ||
buffer: any[]; | ||
private sendInterval; | ||
@@ -10,0 +11,0 @@ private onClose; |
{ | ||
"name": "@testrtc/watchrtc-sdk", | ||
"version": "1.30.7", | ||
"version": "1.30.9", | ||
"description": "Monitor your WebRTC application by collecting WebRTC statistics from end users", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -245,1 +245,7 @@ # watchRTC JS SDK | ||
- Sometimes watchRTC froze when initiating a session. That has been fixed | ||
### 1.30.8 (February 15, 2022) | ||
#### Bug fixes | ||
- We now capture getUserMedia failures as well. These will be collected and reported if a peer connection object is created by the application |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
251
2.45%1
-50%2
-33.33%417195
-10.36%12
-36.84%1185
-48.19%