Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@webex/media-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"deploy:npm": "yarn npm publish"
},
"dependencies": {
"@webex/internal-media-core": "2.14.7",
"@webex/internal-media-core": "2.15.0",
"@webex/ts-events": "^1.1.0",
"@webex/web-media-effects": "2.27.1"
},
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/event-dictionary-ts": "^1.0.1753",
"@webex/internal-media-core": "2.14.7",
"@webex/internal-media-core": "2.15.0",
"@webex/internal-plugin-conversation": "workspace:*",
"@webex/internal-plugin-device": "workspace:*",
"@webex/internal-plugin-llm": "workspace:*",
Expand Down
6 changes: 6 additions & 0 deletions packages/@webex/plugin-meetings/src/media/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Media.createMediaConnection = (
turnServerInfo?: TurnServerInfo;
bundlePolicy?: BundlePolicy;
iceCandidatesTimeout?: number;
disableAudioMainDtx?: boolean;
}
) => {
const {
Expand All @@ -153,6 +154,7 @@ Media.createMediaConnection = (
turnServerInfo,
bundlePolicy,
iceCandidatesTimeout,
disableAudioMainDtx,
} = options;

const iceServers = [];
Expand All @@ -176,6 +178,10 @@ Media.createMediaConnection = (
config.bundlePolicy = bundlePolicy;
}

if (disableAudioMainDtx !== undefined) {
config.disableAudioMainDtx = disableAudioMainDtx;
}

return new MultistreamRoapMediaConnection(
config,
meetingId,
Expand Down
2 changes: 2 additions & 0 deletions packages/@webex/plugin-meetings/src/meeting/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7012,6 +7012,8 @@ export default class Meeting extends StatelessWebexPlugin {
bundlePolicy,
// @ts-ignore - config coming from registerPlugin
iceCandidatesTimeout: this.config.iceCandidatesGatheringTimeout,
// @ts-ignore - config coming from registerPlugin
disableAudioMainDtx: this.config.experimental.disableAudioMainDtx,
}
);

Expand Down
20 changes: 20 additions & 0 deletions packages/@webex/plugin-meetings/src/meetings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,26 @@ export default class Meetings extends WebexPlugin {
}
}

/**
* API to toggle usage of audio main DTX, needs to be called before webex.meetings.register()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment says "needs to be called before webex.meetings.register()" - I don't think that's true, it can be called later as long as it's done before joinWithMedia() or addMedia()

*
* @param {Boolean} newValue
* @private
* @memberof Meetings
* @returns {undefined}
*/
private _toggleDisableAudioMainDtx(newValue: boolean) {
if (typeof newValue !== 'boolean') {
return;
}

// @ts-ignore
if (this.config.experimental.disableAudioMainDtx !== newValue) {
// @ts-ignore
this.config.experimental.disableAudioMainDtx = newValue;
}
}

/**
* Executes a registration step and updates the registration status.
* @param {Function} step - The registration step to execute.
Expand Down
30 changes: 30 additions & 0 deletions packages/@webex/plugin-meetings/test/unit/spec/media/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ describe('createMediaConnection', () => {
password: 'turn password',
},
bundlePolicy: 'max-bundle',
disableAudioMainDtx: false,
});
assert.calledOnce(multistreamRoapMediaConnectionConstructorStub);
assert.calledWith(
Expand All @@ -172,6 +173,7 @@ describe('createMediaConnection', () => {
},
],
bundlePolicy: 'max-bundle',
disableAudioMainDtx: false,
},
'meeting id'
);
Expand Down Expand Up @@ -262,6 +264,34 @@ describe('createMediaConnection', () => {
);
});

it('does not pass disableAudioMainDtx to MultistreamRoapMediaConnection if disableAudioMainDtx is undefined', () => {
const multistreamRoapMediaConnectionConstructorStub = sinon
.stub(InternalMediaCoreModule, 'MultistreamRoapMediaConnection')
.returns(fakeRoapMediaConnection);

Media.createMediaConnection(true, 'debug string', 'meeting id', {
mediaProperties: {
mediaDirection: {
sendAudio: true,
sendVideo: true,
sendShare: false,
receiveAudio: true,
receiveVideo: true,
receiveShare: true,
},
},
disableAudioMainDtx: undefined,
});
assert.calledOnce(multistreamRoapMediaConnectionConstructorStub);
assert.calledWith(
multistreamRoapMediaConnectionConstructorStub,
{
iceServers: [],
},
'meeting id'
);
});

[
{testCase: 'turnServerInfo is undefined', turnServerInfo: undefined},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,19 @@ describe('plugin-meetings', () => {
});
});

describe('#_toggleDisableAudioMainDtx', () => {
it('should have _toggleDisableAudioMainDtx', () => {
assert.equal(typeof webex.meetings._toggleDisableAudioMainDtx, 'function');
});

describe('success', () => {
it('should update meetings to disable audio main dtx', () => {
webex.meetings._toggleDisableAudioMainDtx(true);
assert.equal(webex.meetings.config.experimental.disableAudioMainDtx, true);
});
});
});

describe('Public API Contracts', () => {
describe('#register', () => {
it('emits an event and resolves when register succeeds', async () => {
Expand Down Expand Up @@ -658,7 +671,7 @@ describe('plugin-meetings', () => {
quality: 'LOW',
authToken: 'fake_token',
mirror: false,
canvasResolutionScaling: 1
canvasResolutionScaling: 1,
});
assert.exists(result.enable);
assert.exists(result.disable);
Expand All @@ -674,7 +687,7 @@ describe('plugin-meetings', () => {
quality: 'HIGH',
blurStrength: 'STRONG',
bgImageUrl: 'https://test.webex.com/landscape.5a535788.jpg',
canvasResolutionScaling: 1
canvasResolutionScaling: 1,
};

const result = await webex.meetings.createVirtualBackgroundEffect(effectOptions);
Expand Down
2 changes: 1 addition & 1 deletion packages/calling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"dependencies": {
"@types/platform": "1.3.4",
"@webex/internal-media-core": "2.14.7",
"@webex/internal-media-core": "2.15.0",
"@webex/internal-plugin-metrics": "workspace:*",
"@webex/media-helpers": "workspace:*",
"async-mutex": "0.4.0",
Expand Down
24 changes: 12 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7827,7 +7827,7 @@ __metadata:
"@typescript-eslint/eslint-plugin": 5.38.1
"@typescript-eslint/parser": 5.38.1
"@web/dev-server": 0.4.5
"@webex/internal-media-core": 2.14.7
"@webex/internal-media-core": 2.15.0
"@webex/internal-plugin-metrics": "workspace:*"
"@webex/media-helpers": "workspace:*"
async-mutex: 0.4.0
Expand Down Expand Up @@ -8118,22 +8118,22 @@ __metadata:
languageName: unknown
linkType: soft

"@webex/internal-media-core@npm:2.14.7":
version: 2.14.7
resolution: "@webex/internal-media-core@npm:2.14.7"
"@webex/internal-media-core@npm:2.15.0":
version: 2.15.0
resolution: "@webex/internal-media-core@npm:2.15.0"
dependencies:
"@babel/runtime": ^7.18.9
"@babel/runtime-corejs2": ^7.25.0
"@webex/rtcstats": ^1.5.0
"@webex/ts-sdp": 1.7.0
"@webex/web-capabilities": ^1.4.1
"@webex/web-client-media-engine": 3.30.2
"@webex/web-client-media-engine": 3.31.0
events: ^3.3.0
typed-emitter: ^2.1.0
uuid: ^8.3.2
webrtc-adapter: ^8.1.2
xstate: ^4.30.6
checksum: 74aa21cafd03892a572a7a8538d0e0e3df4a094ed2921ef95bd7bea6d02b515f3af2aa4b4c2c2946339e5fdae72f1aa07fe94b71f09fb755ba8867b634d68bc4
checksum: 4c69ac65fcb323f7f605268272a757f8b1094c73045f10acf9bb0244e70ffb3fd911c73a9c24d140437f45eb6eaaf04660144785d206435184759ba5bf0d238b
languageName: node
linkType: hard

Expand Down Expand Up @@ -8905,7 +8905,7 @@ __metadata:
"@babel/preset-typescript": 7.22.11
"@webex/babel-config-legacy": "workspace:*"
"@webex/eslint-config-legacy": "workspace:*"
"@webex/internal-media-core": 2.14.7
"@webex/internal-media-core": 2.15.0
"@webex/jest-config-legacy": "workspace:*"
"@webex/legacy-tools": "workspace:*"
"@webex/test-helper-chai": "workspace:*"
Expand Down Expand Up @@ -9202,7 +9202,7 @@ __metadata:
"@webex/common": "workspace:*"
"@webex/eslint-config-legacy": "workspace:*"
"@webex/event-dictionary-ts": ^1.0.1753
"@webex/internal-media-core": 2.14.7
"@webex/internal-media-core": 2.15.0
"@webex/internal-plugin-conversation": "workspace:*"
"@webex/internal-plugin-device": "workspace:*"
"@webex/internal-plugin-llm": "workspace:*"
Expand Down Expand Up @@ -9921,9 +9921,9 @@ __metadata:
languageName: node
linkType: hard

"@webex/web-client-media-engine@npm:3.30.2":
version: 3.30.2
resolution: "@webex/web-client-media-engine@npm:3.30.2"
"@webex/web-client-media-engine@npm:3.31.0":
version: 3.31.0
resolution: "@webex/web-client-media-engine@npm:3.31.0"
dependencies:
"@webex/json-multistream": ^2.2.1
"@webex/rtcstats": ^1.5.0
Expand All @@ -9936,7 +9936,7 @@ __metadata:
js-logger: ^1.6.1
typed-emitter: ^2.1.0
uuid: ^8.3.2
checksum: 04827fb93a4458b2ed14d1ff112fd5c7398cfe5b4a924a5a58b3a89f211ccd4991c62b6ee3bed5f90b8f81ce6b1074d372da76b25b52e6e7bfb720e9a910027d
checksum: 4e7b18ae72862c48f339f70a6d0f57f33d30f801edf23926ec9d63e72c2335f473396af5d419028f78e95cd606d2e2f3ebc46e9d384dd13881310f76b8e4a45b
languageName: node
linkType: hard

Expand Down
Loading