From a139eb3fe96b164840f047d5ea6185fb1e09b412 Mon Sep 17 00:00:00 2001 From: hifibuild Date: Mon, 7 Jun 2021 21:12:26 +0000 Subject: [PATCH 1/6] Bump package version to 1.2.1-0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index da3dcc3d..bace9624 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "hifi-spatial-audio", - "version": "1.2.0", + "version": "1.2.1-0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 9bbc1137..bfaf7b4f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hifi-spatial-audio", - "version": "1.2.0", + "version": "1.2.1-0", "description": "The High Fidelity Audio Client Library allows developers to integrate High Fidelity's spatial audio technology into their projects.", "main": "./dist/index.js", "types": "./dist/index.d.ts", From 47e9b28dafbaf8e6003beeb4be0e64532a1213f4 Mon Sep 17 00:00:00 2001 From: Maia Hansen Date: Thu, 10 Jun 2021 11:57:34 -0700 Subject: [PATCH 2/6] No ticket: Need to explicitly trap "CLOSED" state changes as well; probably fall-out from PR-118? --- src/classes/HiFiMixerSession.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/classes/HiFiMixerSession.ts b/src/classes/HiFiMixerSession.ts index a7da1cb5..af555704 100644 --- a/src/classes/HiFiMixerSession.ts +++ b/src/classes/HiFiMixerSession.ts @@ -897,6 +897,14 @@ export class HiFiMixerSession { } this._setCurrentHiFiConnectionState(HiFiConnectionStates.Failed); break; + case RaviSessionStates.CLOSED: + // We don't want to override an "Unavailable" state. (This will hopefully + // be able to go away once changes from HIFI-629 are complete, but is safe to leave in for now.) + if (this._currentHiFiConnectionState === HiFiConnectionStates.Unavailable) { + break; + } + this._setCurrentHiFiConnectionState(HiFiConnectionStates.Disconnected); + break; } } From 154f987526052e42bcb04f29c44e866f7e9e9080 Mon Sep 17 00:00:00 2001 From: hifibuild Date: Thu, 10 Jun 2021 19:07:46 +0000 Subject: [PATCH 3/6] Bump package version to 1.2.1-1 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index bace9624..e5cbaca9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "hifi-spatial-audio", - "version": "1.2.1-0", + "version": "1.2.1-1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index bfaf7b4f..86519f08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hifi-spatial-audio", - "version": "1.2.1-0", + "version": "1.2.1-1", "description": "The High Fidelity Audio Client Library allows developers to integrate High Fidelity's spatial audio technology into their projects.", "main": "./dist/index.js", "types": "./dist/index.d.ts", From 266e071339d86f613afccb4061027e7200569317 Mon Sep 17 00:00:00 2001 From: Maia Hansen Date: Thu, 10 Jun 2021 13:42:56 -0700 Subject: [PATCH 4/6] No ticket: Decision made via Slack to allow "Failed" connection statuses to then subsequently transition to "Disconnected" if the connection ends up explicitly getting closed (which it does, via the library). This changes the tests to watch to make sure that a "Failed" status change handler does fire, and that the connection then subsequently goes to "Disconnected". Will also be relevant for work being done as part of HIFI-629. --- tests/smoke/rest.smoke.test.ts | 12 +++++++++--- tests/testUtilities/TestUser.ts | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/smoke/rest.smoke.test.ts b/tests/smoke/rest.smoke.test.ts index 2521e77a..8ccabb39 100644 --- a/tests/smoke/rest.smoke.test.ts +++ b/tests/smoke/rest.smoke.test.ts @@ -393,8 +393,13 @@ describe('HiFi API REST Calls', () => { }); await sleep(30000); for (let i = 0; i < numberTestUsers; i++) { - if (i === 0) expect(testUsers[i].connectionState).toBe(HiFiConnectionStates.Failed); - else expect(testUsers[i].connectionState).toBe(HiFiConnectionStates.Connected); + if (i === 0) { + expect(testUsers[i].connectionFailed).toBe(true); + expect(testUsers[i].connectionState).toBe(HiFiConnectionStates.Disconnected); + } else { + expect(testUsers[i].connectionFailed).toBe(false); + expect(testUsers[i].connectionState).toBe(HiFiConnectionStates.Connected); + } } }); @@ -404,7 +409,8 @@ describe('HiFi API REST Calls', () => { }); await sleep(30000); for (let i = 0; i < numberTestUsers; i++) { - expect(testUsers[i].connectionState).toBe(HiFiConnectionStates.Failed); + expect(testUsers[i].connectionFailed).toBe(true); + expect(testUsers[i].connectionState).toBe(HiFiConnectionStates.Disconnected); } }); }); diff --git a/tests/testUtilities/TestUser.ts b/tests/testUtilities/TestUser.ts index 98264a05..56bef81e 100644 --- a/tests/testUtilities/TestUser.ts +++ b/tests/testUtilities/TestUser.ts @@ -5,11 +5,13 @@ export type MuteState = "MUTED_FIXED" | "MUTED_NOT_FIXED" | "UNMUTED"; export class TestUser { name: string; connectionState: HiFiConnectionStates; + connectionFailed: boolean; muteState: MuteState; communicator: HiFiCommunicator; constructor(name: string) { this.name = name; + this.connectionFailed = false; this.connectionState = HiFiConnectionStates.Disconnected; this.muteState = "UNMUTED"; this.communicator = new HiFiCommunicator({ @@ -20,6 +22,9 @@ export class TestUser { onConnectionStateChanged(connectionState: HiFiConnectionStates) { this.connectionState = connectionState; + if (connectionState === HiFiConnectionStates.Failed) { + this.connectionFailed = true; + } } onMuteChanged(data: any) { From 41a2b6111d729e9b275b344b5412679108053b0f Mon Sep 17 00:00:00 2001 From: hifibuild Date: Thu, 10 Jun 2021 21:04:11 +0000 Subject: [PATCH 5/6] Bump package version to 1.2.1-2 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5cbaca9..b2887828 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "hifi-spatial-audio", - "version": "1.2.1-1", + "version": "1.2.1-2", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 86519f08..6a0e0f58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hifi-spatial-audio", - "version": "1.2.1-1", + "version": "1.2.1-2", "description": "The High Fidelity Audio Client Library allows developers to integrate High Fidelity's spatial audio technology into their projects.", "main": "./dist/index.js", "types": "./dist/index.d.ts", From dda4e01f8db2063c030fb8b3eb5a23059a6ebbc3 Mon Sep 17 00:00:00 2001 From: bridie-hifi Date: Thu, 10 Jun 2021 15:11:13 -0700 Subject: [PATCH 6/6] 1.2.1 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index b2887828..e49c54c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "hifi-spatial-audio", - "version": "1.2.1-2", + "version": "1.2.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 6a0e0f58..a4f5fdbf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hifi-spatial-audio", - "version": "1.2.1-2", + "version": "1.2.1", "description": "The High Fidelity Audio Client Library allows developers to integrate High Fidelity's spatial audio technology into their projects.", "main": "./dist/index.js", "types": "./dist/index.d.ts",