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
4 changes: 2 additions & 2 deletions packages/@webex/media-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"deploy:npm": "yarn npm publish"
},
"dependencies": {
"@webex/internal-media-core": "2.20.0",
"@webex/internal-media-core": "2.20.1",
"@webex/ts-events": "^1.1.0",
"@webex/web-media-effects": "2.27.1"
"@webex/web-media-effects": "2.32.1"
},
"browserify": {
"transform": [
Expand Down
2 changes: 2 additions & 0 deletions packages/@webex/media-helpers/src/webrtc-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export {
RemoteStreamEventNames,
type VideoContentHint,
type StreamState,
type InboundAudioIssueEvent,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

these exports is something I missed in some previous PRs, web app needs them (for now it's importing them directly from internal-media-core, but really it should do it via SDK)

InboundAudioIssueSubTypes,
} from '@webex/internal-media-core';

export type ServerMuteReason =
Expand Down
4 changes: 2 additions & 2 deletions packages/@webex/plugin-meetings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"dependencies": {
"@webex/common": "workspace:*",
"@webex/event-dictionary-ts": "^1.0.1930",
"@webex/internal-media-core": "2.20.0",
"@webex/internal-media-core": "2.20.1",
"@webex/internal-plugin-conversation": "workspace:*",
"@webex/internal-plugin-device": "workspace:*",
"@webex/internal-plugin-llm": "workspace:*",
Expand All @@ -75,7 +75,7 @@
"@webex/plugin-people": "workspace:*",
"@webex/plugin-rooms": "workspace:*",
"@webex/ts-sdp": "^1.8.1",
"@webex/web-capabilities": "^1.6.0",
"@webex/web-capabilities": "^1.7.1",
"@webex/webex-core": "workspace:*",
"ampersand-collection": "^2.0.2",
"bowser": "^2.11.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@webex/plugin-meetings/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export const EVENT_TRIGGERS = {
MEETING_SELF_LEFT: 'meeting:self:left',
NETWORK_QUALITY: 'network:quality',
MEDIA_NEGOTIATED: 'media:negotiated',
MEDIA_INBOUND_AUDIO_ISSUE_DETECTED: 'media:inboundAudio:issueDetected',
MEDIA_INBOUND_AUDIO_ISSUE_DETECTED: 'media:inboundAudio:issueDetected', // event.data: InboundAudioIssueEvent
// the following events apply only to multistream media connections
ACTIVE_SPEAKER_CHANGED: 'media:activeSpeakerChanged',
REMOTE_VIDEO_SOURCE_COUNT_CHANGED: 'media:remoteVideoSourceCountChanged',
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 @@ -194,6 +194,12 @@ Media.createMediaConnection = (
config.stopIceGatheringAfterFirstRelayCandidate = stopIceGatheringAfterFirstRelayCandidate;
}

if (BrowserInfo.isEdge() || BrowserInfo.isChrome()) {
// we need this for getting inbound audio metadata
// but the audioLevel that we use is only available on Chromium based browsers
config.enableInboundAudioLevelMonitoring = true;
}

return new MultistreamRoapMediaConnection(
config,
meetingId,
Expand Down
1 change: 1 addition & 0 deletions packages/@webex/plugin-meetings/src/meeting/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
NetworkQualityMonitor,
StatsMonitor,
StatsMonitorEventNames,
InboundAudioIssueSubTypes,
} from '@webex/internal-media-core';

import {
Expand Down
149 changes: 140 additions & 9 deletions packages/@webex/plugin-meetings/test/unit/spec/media/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ describe('createMediaConnection', () => {
const roapMediaConnectionConstructorStub = sinon
.stub(InternalMediaCoreModule, 'RoapMediaConnection')
.returns(fakeRoapMediaConnection);

StaticConfig.set({bandwidth: {audio: 123, video: 456, startBitrate: 999}});

const ENABLE_EXTMAP = false;
const ENABLE_RTX = true;

Media.createMediaConnection(false, 'sendonly-debug-id', 'meetingId', {
mediaProperties: {
mediaDirection: {
Expand All @@ -168,7 +168,7 @@ describe('createMediaConnection', () => {
turnServerInfo: undefined,
iceCandidatesTimeout: undefined,
});

assert.calledWith(
roapMediaConnectionConstructorStub,
sinon.match.any,
Expand All @@ -194,12 +194,12 @@ describe('createMediaConnection', () => {
const roapMediaConnectionConstructorStub = sinon
.stub(InternalMediaCoreModule, 'RoapMediaConnection')
.returns(fakeRoapMediaConnection);

StaticConfig.set({bandwidth: {audio: 123, video: 456, startBitrate: 999}});

const ENABLE_EXTMAP = true;
const ENABLE_RTX = false;

Media.createMediaConnection(false, 'recvonly-debug-id', 'meetingId', {
mediaProperties: {
mediaDirection: {
Expand All @@ -221,7 +221,7 @@ describe('createMediaConnection', () => {
turnServerInfo: undefined,
iceCandidatesTimeout: undefined,
});

assert.calledWith(
roapMediaConnectionConstructorStub,
sinon.match.any,
Expand All @@ -242,7 +242,6 @@ describe('createMediaConnection', () => {
'recvonly-debug-id'
);
});


it('creates a MultistreamRoapMediaConnection when multistream is enabled', () => {
const multistreamRoapMediaConnectionConstructorStub = sinon
Expand Down Expand Up @@ -511,6 +510,138 @@ describe('createMediaConnection', () => {
);
});

const testEnableInboundAudioLevelMonitoring = (
testName: string,
browserStubs: {isChrome?: boolean; isEdge?: boolean; isFirefox?: boolean},
isMultistream: boolean,
expectedConfig: object,
additionalOptions = {}
) => {
it(testName, () => {
const connectionConstructorStub = isMultistream
? sinon.stub(InternalMediaCoreModule, 'MultistreamRoapMediaConnection')
: sinon.stub(InternalMediaCoreModule, 'RoapMediaConnection');

connectionConstructorStub.returns(fakeRoapMediaConnection);

// Set up browser stubs
sinon.stub(BrowserInfo, 'isChrome').returns(browserStubs.isChrome || false);
sinon.stub(BrowserInfo, 'isEdge').returns(browserStubs.isEdge || false);
sinon.stub(BrowserInfo, 'isFirefox').returns(browserStubs.isFirefox || false);

const baseOptions = {
mediaProperties: {
mediaDirection: {
sendAudio: true,
sendVideo: true,
sendShare: false,
receiveAudio: true,
receiveVideo: true,
receiveShare: true,
},
...(isMultistream
? {}
: {
audioStream: fakeAudioStream,
videoStream: fakeVideoStream,
shareVideoTrack: null,
shareAudioTrack: null,
}),
},
...(isMultistream
? {}
: {
remoteQualityLevel: 'HIGH',
enableRtx: true,
enableExtmap: true,
}),
...additionalOptions,
};

if (!isMultistream) {
StaticConfig.set({bandwidth: {audio: 123, video: 456, startBitrate: 999}});
}

Media.createMediaConnection(isMultistream, 'debug string', 'meeting id', baseOptions);

if (isMultistream) {
assert.calledOnceWithExactly(
connectionConstructorStub,
expectedConfig,
'meeting id',
sinon.match.func,
sinon.match.func,
sinon.match.func
);
} else {
assert.calledOnceWithExactly(
connectionConstructorStub,
expectedConfig,
sinon.match.object,
'debug string'
);
}
});
};

testEnableInboundAudioLevelMonitoring(
'enables enableInboundAudioLevelMonitoring for multistream when browser is Chrome',
{isChrome: true},
true,
{
iceServers: [],
disableAudioTwcc: true,
enableInboundAudioLevelMonitoring: true,
}
);

testEnableInboundAudioLevelMonitoring(
'enables enableInboundAudioLevelMonitoring for multistream when browser is Edge',
{isEdge: true},
true,
{
iceServers: [],
disableAudioTwcc: true,
enableInboundAudioLevelMonitoring: true,
}
);

testEnableInboundAudioLevelMonitoring(
'does not enable enableInboundAudioLevelMonitoring for multistream when browser is Firefox',
{isFirefox: true},
true,
{
iceServers: [],
disableAudioTwcc: true,
doFullIce: true,
stopIceGatheringAfterFirstRelayCandidate: undefined,
}
);

testEnableInboundAudioLevelMonitoring(
'does not enable enableInboundAudioLevelMonitoring for non-multistream connections even when browser is Chrome',
{isChrome: true},
false,
{
iceServers: [],
iceCandidatesTimeout: undefined,
skipInactiveTransceivers: false,
requireH264: true,
sdpMunging: {
convertPort9to0: false,
addContentSlides: true,
bandwidthLimits: {
audio: 123,
video: 456,
},
startBitrate: 999,
periodicKeyframes: 20,
disableExtmap: false,
disableRtx: false,
},
}
);

[
{testCase: 'turnServerInfo is undefined', turnServerInfo: undefined},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -690,11 +690,9 @@ describe('plugin-meetings', () => {
assert.deepEqual(result.options, {
mode: 'BLUR',
blurStrength: 'STRONG',
generator: 'worker',
quality: 'LOW',
authToken: 'fake_token',
mirror: false,
canvasResolutionScaling: 1,
});
assert.exists(result.enable);
assert.exists(result.disable);
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.20.0",
"@webex/internal-media-core": "2.20.1",
"@webex/internal-plugin-metrics": "workspace:*",
"@webex/media-helpers": "workspace:*",
"async-mutex": "0.4.0",
Expand Down
Loading
Loading