Skip to content

Commit

Permalink
fix(media-helper): update internal-media-core with webrtc-core mute c…
Browse files Browse the repository at this point in the history
…hanges (#3342)

Co-authored-by: Bryce Tham <[email protected]>
  • Loading branch information
2 people authored and sreenara committed Jan 31, 2024
1 parent 90b4414 commit a78211d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 33 deletions.
2 changes: 1 addition & 1 deletion packages/@webex/media-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"deploy:npm": "yarn npm publish"
},
"dependencies": {
"@webex/internal-media-core": "2.2.2",
"@webex/internal-media-core": "2.2.3",
"@webex/ts-events": "^1.1.0",
"@webex/web-media-effects": "^2.15.6"
},
Expand Down
19 changes: 10 additions & 9 deletions packages/@webex/media-helpers/test/unit/spec/webrtc-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe('media-helpers', () => {
label: 'fake track',
id: 'fake track id',
enabled: true,
muted: false,
addEventListener: sinon.stub(),
},
]),
Expand Down Expand Up @@ -73,22 +74,22 @@ describe('media-helpers', () => {

it('returns a reasonable length string from JSON.stringify()', () => {
assert.isBelow(JSON.stringify(stream).length, 200);
})
});

describe('#setServerMuted', () => {
afterEach(() => {
sinon.restore();
});

const checkSetServerMuted = async (startMute, setMute, expectedCalled) => {
await stream.setMuted(startMute);
const checkSetServerMuted = (startMute, setMute, expectedCalled) => {
stream.setMuted(startMute);

assert.equal(stream.muted, startMute);

const handler = sinon.fake();
stream.on(event.ServerMuted, handler);

await stream.setServerMuted(setMute, 'remotelyMuted');
stream.setServerMuted(setMute, 'remotelyMuted');

assert.equal(stream.muted, setMute);
if (expectedCalled) {
Expand All @@ -99,19 +100,19 @@ describe('media-helpers', () => {
};

it('tests true to false', async () => {
await checkSetServerMuted(true, false, true);
checkSetServerMuted(true, false, true);
});

it('tests false to true', async () => {
await checkSetServerMuted(false, true, true);
checkSetServerMuted(false, true, true);
});

it('tests true to true', async () => {
await checkSetServerMuted(true, true, false);
checkSetServerMuted(true, true, false);
});

it('tests false to false', async () => {
await checkSetServerMuted(false, false, false);
checkSetServerMuted(false, false, false);
});
});

Expand All @@ -137,7 +138,7 @@ describe('media-helpers', () => {
assert.calledOnceWithExactly(spy, LocalDisplayStream);
});
});

describe('createDisplayStreamWithAudio', () => {
it('checks createDisplayStreamWithAudio', async () => {
const spy = sinon.stub(wcmestreams, 'createDisplayStreamWithAudio').returns('something');
Expand Down
2 changes: 1 addition & 1 deletion packages/@webex/plugin-meetings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
},
"dependencies": {
"@webex/common": "workspace:^",
"@webex/internal-media-core": "2.2.2",
"@webex/internal-media-core": "2.2.3",
"@webex/internal-plugin-conversation": "workspace:^",
"@webex/internal-plugin-device": "workspace:^",
"@webex/internal-plugin-llm": "workspace:^",
Expand Down
51 changes: 29 additions & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6772,20 +6772,20 @@ __metadata:
languageName: node
linkType: hard

"@webex/internal-media-core@npm:2.2.2":
version: 2.2.2
resolution: "@webex/internal-media-core@npm:2.2.2"
"@webex/internal-media-core@npm:2.2.3":
version: 2.2.3
resolution: "@webex/internal-media-core@npm:2.2.3"
dependencies:
"@babel/runtime": "npm:^7.18.9"
"@webex/ts-sdp": "npm:1.6.0"
"@webex/web-client-media-engine": "npm:3.11.1"
"@webex/web-client-media-engine": "npm:3.11.4"
detectrtc: "npm:^1.4.1"
events: "npm:^3.3.0"
typed-emitter: "npm:^2.1.0"
uuid: "npm:^8.3.2"
webrtc-adapter: "npm:^8.1.2"
xstate: "npm:^4.30.6"
checksum: c5ca3ff1e186feac627564f27469e019a87de4466a2f98212a7e475fff8dd12a6857023ecf99b2463ee88b7521613d6a2702f5bd1b3d33652c0d3dfba2fa8e35
checksum: 058641f326c3e4995f0335efe8156c017137be885072132c16ccb717fdc47f6c67310180020e66781f55bf688bb71a117bcaa2ccafca91f5ddfcc821e693ef92
languageName: node
linkType: hard

Expand Down Expand Up @@ -7449,6 +7449,13 @@ __metadata:
languageName: unknown
linkType: soft

"@webex/json-multistream@npm:2.1.2":
version: 2.1.2
resolution: "@webex/json-multistream@npm:2.1.2"
checksum: be28a560e049a517cf953ffde5201eff6fa6cd0b625205ff7cae8b25bae5ad373b2399e6a91ec6dd2f8b7dbcb273c92407e74029a58348210931fb9f3aa80f49
languageName: node
linkType: hard

"@webex/json-multistream@npm:^2.1.1":
version: 2.1.1
resolution: "@webex/json-multistream@npm:2.1.1"
Expand Down Expand Up @@ -7539,7 +7546,7 @@ __metadata:
"@babel/preset-typescript": 7.22.11
"@webex/babel-config-legacy": "workspace:^"
"@webex/eslint-config-legacy": "workspace:^"
"@webex/internal-media-core": 2.2.2
"@webex/internal-media-core": 2.2.3
"@webex/jest-config-legacy": "workspace:^"
"@webex/legacy-tools": "workspace:^"
"@webex/test-helper-chai": "workspace:^"
Expand Down Expand Up @@ -7777,7 +7784,7 @@ __metadata:
"@webex/babel-config-legacy": "workspace:^"
"@webex/common": "workspace:^"
"@webex/eslint-config-legacy": "workspace:^"
"@webex/internal-media-core": 2.2.2
"@webex/internal-media-core": 2.2.3
"@webex/internal-plugin-conversation": "workspace:^"
"@webex/internal-plugin-device": "workspace:^"
"@webex/internal-plugin-llm": "workspace:^"
Expand Down Expand Up @@ -8044,13 +8051,13 @@ __metadata:
languageName: unknown
linkType: soft

"@webex/rtcstats@npm:^1.1.1":
version: 1.1.1
resolution: "@webex/rtcstats@npm:1.1.1"
"@webex/rtcstats@npm:^1.1.1, @webex/rtcstats@npm:^1.1.2":
version: 1.1.2
resolution: "@webex/rtcstats@npm:1.1.2"
dependencies:
"@types/node": "npm:^18.7.6"
uuid: "npm:^8.3.2"
checksum: e357651ffbcece7c8eef9aaa784192ca762fa4b77e1609061b26c51df0d10306bfb4c0ea2fb3490bdf080a552b5fa105fbe0cd40e5bf01f05e2bc0cf573ed080
checksum: 0a379acf9f381fc673750d034759ae87fee9292e034dfe5fa50a3f18b78f87d55fae36918e5e7c212b46b4ed5534fed4b7e2aa8d4d58182e9113cd596c94c107
languageName: node
linkType: hard

Expand Down Expand Up @@ -8462,21 +8469,21 @@ __metadata:
languageName: node
linkType: hard

"@webex/web-client-media-engine@npm:3.11.1":
version: 3.11.1
resolution: "@webex/web-client-media-engine@npm:3.11.1"
"@webex/web-client-media-engine@npm:3.11.4":
version: 3.11.4
resolution: "@webex/web-client-media-engine@npm:3.11.4"
dependencies:
"@webex/json-multistream": "npm:^2.1.1"
"@webex/rtcstats": "npm:^1.1.1"
"@webex/json-multistream": "npm:2.1.2"
"@webex/rtcstats": "npm:^1.1.2"
"@webex/ts-events": "npm:^1.0.1"
"@webex/ts-sdp": "npm:1.6.0"
"@webex/web-capabilities": "npm:^1.1.1"
"@webex/webrtc-core": "npm:2.3.0"
"@webex/webrtc-core": "npm:2.3.1"
async: "npm:^3.2.4"
js-logger: "npm:^1.6.1"
typed-emitter: "npm:^2.1.0"
uuid: "npm:^8.3.2"
checksum: 7103c9793030b039664e29cbbaef3d9a74814e3724b518db40fd6124e41f58b59d9af91f7ff83572318df0f13a1f07600f0d6424f2f273910b4b2ed9cc953da2
checksum: 522e76f9d0e2b8ff33ff5d6bb7eb67f60977d19897a70462037cd966750a9bf644de5a60a09ce801aabf4e4efa9cc18a1014c22cb3ab1139e4b91c54fa751a7b
languageName: node
linkType: hard

Expand Down Expand Up @@ -8628,9 +8635,9 @@ __metadata:
languageName: node
linkType: hard

"@webex/webrtc-core@npm:2.3.0":
version: 2.3.0
resolution: "@webex/webrtc-core@npm:2.3.0"
"@webex/webrtc-core@npm:2.3.1":
version: 2.3.1
resolution: "@webex/webrtc-core@npm:2.3.1"
dependencies:
"@webex/ts-events": "npm:^1.1.0"
"@webex/web-capabilities": "npm:^1.1.0"
Expand All @@ -8639,7 +8646,7 @@ __metadata:
js-logger: "npm:^1.6.1"
typed-emitter: "npm:^2.1.0"
webrtc-adapter: "npm:^8.1.2"
checksum: ecbdce95478f3db34ddeb1a7308fba039aeb4b7e9a0111e8efa804e8f8b1aca5d7a7720020ea0557aa107bbc7c55fe11443e308b5b926fca55364abc3c5ede7d
checksum: e8630816224691ecc59869ee501ab1f5e42a8ebd150e6070537dd1b8753a7116c5f58842c9c7d7adb03a6f3be6aaaa2e1ad35c912cf81f58377aa1b26a1eb570
languageName: node
linkType: hard

Expand Down

0 comments on commit a78211d

Please sign in to comment.