@100mslive/hms-video-store
Advanced tools
Comparing version 0.12.14-alpha.3 to 0.12.14-alpha.4
@@ -29,2 +29,5 @@ import { ConnectivityCheckResult, ConnectivityState, HMSDiagnosticsConnectivityListener } from './interfaces'; | ||
private timestamp; | ||
private _state?; | ||
private get state(); | ||
private set state(value); | ||
constructor(sdk: HMSSdk, sdkListener: HMSUpdateListener, progressCallback: (state: ConnectivityState) => void, completionCallback: (state: ConnectivityCheckResult) => void); | ||
@@ -47,5 +50,2 @@ onRoomUpdate: (type: import("../internal").HMSRoomUpdate, room: HMSRoom) => void; | ||
onWhiteboardUpdate: (whiteboard: import("../internal").HMSWhiteboard) => void; | ||
private _state; | ||
private get state(); | ||
private set state(value); | ||
handleConnectionQualityUpdate: (qualities: HMSConnectionQuality[]) => void; | ||
@@ -52,0 +52,0 @@ onICESuccess(isPublish: boolean): void; |
@@ -10,5 +10,5 @@ import { ConnectivityCheckResult, ConnectivityState, HMSDiagnosticsInterface, MediaPermissionCheck } from './interfaces'; | ||
private mediaRecorder?; | ||
private isConnectivityCheckInProgress; | ||
constructor(sdk: HMSSdk, sdkListener: HMSUpdateListener); | ||
get localPeer(): HMSLocalPeer | undefined; | ||
checkBrowserSupport(): void; | ||
requestPermission(check: MediaPermissionCheck): Promise<MediaPermissionCheck>; | ||
@@ -15,0 +15,0 @@ startCameraCheck(inputDevice?: string): Promise<void>; |
@@ -26,2 +26,3 @@ import { RTCIceCandidatePair } from '../connection/IConnectionObserver'; | ||
requestPermission(check: MediaPermissionCheck): Promise<MediaPermissionCheck>; | ||
checkBrowserSupport(): void; | ||
startMicCheck(inputDevice?: string, onStop?: () => void, time?: number): Promise<void>; | ||
@@ -37,3 +38,3 @@ getRecordedAudio(): string | undefined; | ||
testTimestamp: number; | ||
connectivityState: ConnectivityState; | ||
connectivityState?: ConnectivityState; | ||
signallingReport?: SignallingReport; | ||
@@ -40,0 +41,0 @@ mediaServerReport?: MediaServerReport; |
{ | ||
"version": "0.12.14-alpha.3", | ||
"version": "0.12.14-alpha.4", | ||
"license": "MIT", | ||
@@ -76,3 +76,3 @@ "repository": { | ||
], | ||
"gitHead": "2f240d7e6b687be3ead9f9fb40eb5a8f538a4e09" | ||
"gitHead": "870d07094ed80ee2fefe344a743b4c463b046ccb" | ||
} |
@@ -39,2 +39,13 @@ import { CONNECTIVITY_TEST_DURATION } from './constants'; | ||
private timestamp = Date.now(); | ||
private _state?: ConnectivityState; | ||
private get state(): ConnectivityState | undefined { | ||
return this._state; | ||
} | ||
private set state(value: ConnectivityState | undefined) { | ||
if (value === undefined || (this._state !== undefined && value < this._state)) { | ||
return; | ||
} | ||
this._state = value; | ||
this.progressCallback?.(value); | ||
} | ||
@@ -48,2 +59,3 @@ constructor( | ||
this.statsCollector = new DiagnosticsStatsCollector(sdk); | ||
this.state = ConnectivityState.STARTING; | ||
} | ||
@@ -67,14 +79,2 @@ onRoomUpdate = this.sdkListener.onRoomUpdate.bind(this.sdkListener); | ||
private _state: ConnectivityState = ConnectivityState.STARTING; | ||
private get state(): ConnectivityState { | ||
return this._state; | ||
} | ||
private set state(value: ConnectivityState) { | ||
if (value < this._state) { | ||
return; | ||
} | ||
this._state = value; | ||
this.progressCallback?.(value); | ||
} | ||
handleConnectionQualityUpdate = (qualities: HMSConnectionQuality[]) => { | ||
@@ -81,0 +81,0 @@ const localPeerQuality = qualities.find(quality => quality.peerID === this.sdk?.store.getLocalPeer()?.peerId); |
@@ -26,2 +26,3 @@ import { ConnectivityCheck } from './ConnectivityCheck'; | ||
import { sleep } from '../utils/timer-utils'; | ||
import { validateMediaDevicesExistence, validateRTCPeerConnection } from '../utils/validations'; | ||
@@ -31,3 +32,2 @@ export class Diagnostics implements HMSDiagnosticsInterface { | ||
private mediaRecorder?: MediaRecorder; | ||
private isConnectivityCheckInProgress = false; | ||
@@ -42,2 +42,7 @@ constructor(private sdk: HMSSdk, private sdkListener: HMSUpdateListener) { | ||
checkBrowserSupport(): void { | ||
validateMediaDevicesExistence(); | ||
validateRTCPeerConnection(); | ||
} | ||
async requestPermission(check: MediaPermissionCheck): Promise<MediaPermissionCheck> { | ||
@@ -144,6 +149,3 @@ const stream = await navigator.mediaDevices.getUserMedia(check); | ||
if (this.isConnectivityCheckInProgress) { | ||
return; | ||
} | ||
this.isConnectivityCheckInProgress = true; | ||
const connectivityCheck = new ConnectivityCheck(this.sdk, this.sdkListener, progress, completed); | ||
@@ -156,6 +158,2 @@ const authToken = await this.getAuthToken(region); | ||
const connectivityCheck = new ConnectivityCheck(this.sdk, this.sdkListener, progress, result => { | ||
this.isConnectivityCheckInProgress = false; | ||
completed(result); | ||
}); | ||
await this.sdk.join( | ||
@@ -162,0 +160,0 @@ { authToken, userName: 'diagonistic-test', initEndpoint: 'https://qa-in2-ipv6.100ms.live/init' }, |
@@ -30,2 +30,3 @@ import { RTCIceCandidatePair } from '../connection/IConnectionObserver'; | ||
requestPermission(check: MediaPermissionCheck): Promise<MediaPermissionCheck>; | ||
checkBrowserSupport(): void; | ||
startMicCheck(inputDevice?: string, onStop?: () => void, time?: number): Promise<void>; | ||
@@ -48,3 +49,3 @@ getRecordedAudio(): string | undefined; | ||
testTimestamp: number; // System time in millis (UTC) | ||
connectivityState: ConnectivityState; // This is the initial state | ||
connectivityState?: ConnectivityState; // This is the initial state | ||
signallingReport?: SignallingReport; | ||
@@ -51,0 +52,0 @@ mediaServerReport?: MediaServerReport; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4651284
39703