@100mslive/hms-video-store
Advanced tools
Comparing version 0.12.14-alpha.8 to 0.12.14-alpha.9
@@ -50,2 +50,3 @@ import { HMSLocalPeer } from './models/peer'; | ||
private frameworkInfo?; | ||
private isDiagnostics; | ||
private playlistSettings; | ||
@@ -112,2 +113,4 @@ private initNotificationManager; | ||
addConnectionQualityListener(qualityListener: HMSConnectionQualityListener): void; | ||
/** @internal */ | ||
setIsDiagnostics(isDiagnostics: boolean): void; | ||
changeRole(forPeerId: string, toRole: string, force?: boolean): Promise<void>; | ||
@@ -114,0 +117,0 @@ changeRoleOfPeer(forPeerId: string, toRole: string, force?: boolean): Promise<void>; |
{ | ||
"version": "0.12.14-alpha.8", | ||
"version": "0.12.14-alpha.9", | ||
"license": "MIT", | ||
@@ -76,3 +76,3 @@ "repository": { | ||
], | ||
"gitHead": "16a110b525265ba74c72960c828e6ce933df52cf" | ||
"gitHead": "3caf5ae1abb71e5e7dede48bc4b9b8dfa5a25a8a" | ||
} |
@@ -183,3 +183,3 @@ import { CONNECTIVITY_TEST_DURATION } from './constants'; | ||
this.cleanupTimer = undefined; | ||
if (this.state === ConnectivityState.MEDIA_PUBLISHED && this.errors.length === 0) { | ||
if (this.state === ConnectivityState.MEDIA_PUBLISHED) { | ||
this.state = ConnectivityState.COMPLETED; | ||
@@ -186,0 +186,0 @@ } |
@@ -26,3 +26,2 @@ import { ConnectivityCheck } from './ConnectivityCheck'; | ||
import { fetchWithRetry } from '../utils/fetch'; | ||
import decodeJWT from '../utils/jwt'; | ||
import { validateMediaDevicesExistence, validateRTCPeerConnection } from '../utils/validations'; | ||
@@ -37,2 +36,3 @@ | ||
constructor(private sdk: HMSSdk, private sdkListener: HMSUpdateListener) { | ||
this.sdk.setIsDiagnostics(true); | ||
this.initSdkWithLocalPeer(); | ||
@@ -175,11 +175,4 @@ } | ||
const authToken = await this.getAuthToken(region); | ||
const { roomId } = decodeJWT(authToken); | ||
await this.sdk.leave(); | ||
this.sdk?.store.setRoom(new HMSRoom(roomId)); | ||
await this.sdk.join( | ||
{ authToken, userName: 'diagonistic-test', initEndpoint: 'https://qa-in2-ipv6.100ms.live/init' }, | ||
this.connectivityCheck, | ||
); | ||
await this.sdk.join({ authToken, userName: 'diagnostics-test' }, this.connectivityCheck); | ||
this.sdk.addConnectionQualityListener({ | ||
@@ -220,3 +213,3 @@ onConnectionQualityUpdate: qualityUpdates => { | ||
private async getAuthToken(region?: string): Promise<string> { | ||
const tokenAPIURL = new URL('https://api-nonprod.100ms.live/v2/diagnostics/token'); | ||
const tokenAPIURL = new URL('https://api.100ms.live/v2/diagnostics/token'); | ||
if (region) { | ||
@@ -223,0 +216,0 @@ tokenAPIURL.searchParams.append('region', region); |
@@ -136,2 +136,3 @@ import HMSRoom from './models/HMSRoom'; | ||
private frameworkInfo?: HMSFrameworkInfo; | ||
private isDiagnostics = false; | ||
private playlistSettings: HMSPlaylistSettings = { | ||
@@ -935,2 +936,7 @@ video: { | ||
/** @internal */ | ||
setIsDiagnostics(isDiagnostics: boolean) { | ||
this.isDiagnostics = isDiagnostics; | ||
} | ||
async changeRole(forPeerId: string, toRole: string, force = false) { | ||
@@ -1482,3 +1488,5 @@ await this.transport?.signal.requestRoleChange({ | ||
// ); | ||
this.listener?.onError(error); | ||
if (this.isDiagnostics) { | ||
this.listener?.onError(error); | ||
} | ||
}; | ||
@@ -1510,3 +1518,3 @@ | ||
// don't send analytics for diagnostics | ||
if ((this.listener as unknown as HMSDiagnosticsConnectivityListener).onInitSuccess) { | ||
if (this.isDiagnostics) { | ||
return; | ||
@@ -1513,0 +1521,0 @@ } |
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
39806
4661940