@webex/widgets 1.20.8 → 1.20.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/webexWidgets.esm.js +200 -69
- package/dist/webexWidgets.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/webexWidgets.esm.js
CHANGED
@@ -11749,7 +11749,9 @@ function Ya(e) {
|
|
11749
11749
|
m = l[1],
|
11750
11750
|
p = (i || []).findIndex(function (e) {
|
11751
11751
|
return e.key === r;
|
11752
|
-
})
|
11752
|
+
}),
|
11753
|
+
d = zn();
|
11754
|
+
zt(d, !0);
|
11753
11755
|
return x.createElement("div", {
|
11754
11756
|
className: u,
|
11755
11757
|
style: a
|
@@ -11766,7 +11768,8 @@ function Ya(e) {
|
|
11766
11768
|
}
|
11767
11769
|
},
|
11768
11770
|
"aria-label": "Use arrow keys to navigate between setting options",
|
11769
|
-
role: "tablist"
|
11771
|
+
role: "tablist",
|
11772
|
+
ref: d
|
11770
11773
|
}, i.map(function (e, t) {
|
11771
11774
|
return x.createElement("li", {
|
11772
11775
|
className: De(m("tab"), r === e.key && m("tab--active")),
|
@@ -12830,38 +12833,54 @@ class AudioControl extends MeetingControl {
|
|
12830
12833
|
logger.debug('MEETING', meetingID, 'AudioControl::display()', ['called with', {
|
12831
12834
|
meetingID
|
12832
12835
|
}]);
|
12833
|
-
const
|
12834
|
-
ID: this.ID,
|
12835
|
-
type: 'BUTTON',
|
12836
|
-
icon: 'microphone-muted',
|
12837
|
-
tooltip: 'Unmute audio',
|
12838
|
-
state: i.ACTIVE,
|
12839
|
-
text: 'Unmute'
|
12840
|
-
};
|
12841
|
-
const unmuted = {
|
12836
|
+
const common = {
|
12842
12837
|
ID: this.ID,
|
12843
|
-
type: 'BUTTON'
|
12844
|
-
icon: 'microphone',
|
12845
|
-
tooltip: 'Mute audio',
|
12846
|
-
state: i.INACTIVE,
|
12847
|
-
text: 'Mute'
|
12838
|
+
type: 'BUTTON'
|
12848
12839
|
};
|
12849
|
-
const
|
12850
|
-
|
12851
|
-
|
12852
|
-
|
12853
|
-
|
12854
|
-
|
12840
|
+
const STATES = {
|
12841
|
+
muted: {
|
12842
|
+
icon: 'microphone-muted',
|
12843
|
+
tooltip: 'Unmute audio',
|
12844
|
+
state: i.ACTIVE,
|
12845
|
+
text: 'Unmute'
|
12846
|
+
},
|
12847
|
+
unmuted: {
|
12848
|
+
icon: 'microphone',
|
12849
|
+
tooltip: 'Mute audio',
|
12850
|
+
state: i.INACTIVE,
|
12851
|
+
text: 'Mute'
|
12852
|
+
},
|
12853
|
+
muting: {
|
12854
|
+
icon: 'microphone',
|
12855
|
+
tooltip: 'Muting audio',
|
12856
|
+
state: i.DISABLED,
|
12857
|
+
text: 'Muting...'
|
12858
|
+
},
|
12859
|
+
unmuting: {
|
12860
|
+
icon: 'microphone-muted',
|
12861
|
+
tooltip: 'Unmuting audio',
|
12862
|
+
state: i.DISABLED,
|
12863
|
+
text: 'Unmuting...'
|
12864
|
+
},
|
12865
|
+
noMicrophone: {
|
12866
|
+
icon: 'microphone-muted',
|
12867
|
+
tooltip: 'No microphone available',
|
12868
|
+
state: i.DISABLED,
|
12869
|
+
text: 'No microphone'
|
12870
|
+
}
|
12855
12871
|
};
|
12856
12872
|
return this.adapter.getMeeting(meetingID).pipe(map(_ref => {
|
12857
12873
|
let {
|
12858
12874
|
localAudio: {
|
12859
|
-
stream
|
12875
|
+
stream,
|
12876
|
+
muting
|
12860
12877
|
},
|
12861
12878
|
disabledLocalAudio
|
12862
12879
|
} = _ref;
|
12863
|
-
return stream && unmuted || disabledLocalAudio && muted ||
|
12864
|
-
}), distinctUntilChanged(),
|
12880
|
+
return muting === true && STATES.muting || muting === false && STATES.unmuting || stream && STATES.unmuted || disabledLocalAudio && STATES.muted || STATES.noMicrophone;
|
12881
|
+
}), distinctUntilChanged(), map(state => ({ ...common,
|
12882
|
+
...state
|
12883
|
+
})), tap(display => logger.debug('MEETING', meetingID, 'AudioControl::display()', ['emitting', display])));
|
12865
12884
|
}
|
12866
12885
|
|
12867
12886
|
}
|
@@ -13402,38 +13421,54 @@ class VideoControl extends MeetingControl {
|
|
13402
13421
|
logger.debug('MEETING', meetingID, 'VideoControl::display()', ['called with', {
|
13403
13422
|
meetingID
|
13404
13423
|
}]);
|
13405
|
-
const
|
13406
|
-
ID: this.ID,
|
13407
|
-
type: 'BUTTON',
|
13408
|
-
icon: 'camera-muted',
|
13409
|
-
tooltip: 'Start video',
|
13410
|
-
state: i.ACTIVE,
|
13411
|
-
text: 'Start video'
|
13412
|
-
};
|
13413
|
-
const unmuted = {
|
13424
|
+
const common = {
|
13414
13425
|
ID: this.ID,
|
13415
|
-
type: 'BUTTON'
|
13416
|
-
icon: 'camera',
|
13417
|
-
tooltip: 'Stop video',
|
13418
|
-
state: i.INACTIVE,
|
13419
|
-
text: 'Stop video'
|
13426
|
+
type: 'BUTTON'
|
13420
13427
|
};
|
13421
|
-
const
|
13422
|
-
|
13423
|
-
|
13424
|
-
|
13425
|
-
|
13426
|
-
|
13428
|
+
const STATES = {
|
13429
|
+
muted: {
|
13430
|
+
icon: 'camera-muted',
|
13431
|
+
tooltip: 'Start video',
|
13432
|
+
state: i.ACTIVE,
|
13433
|
+
text: 'Start video'
|
13434
|
+
},
|
13435
|
+
unmuted: {
|
13436
|
+
icon: 'camera',
|
13437
|
+
tooltip: 'Stop video',
|
13438
|
+
state: i.INACTIVE,
|
13439
|
+
text: 'Stop video'
|
13440
|
+
},
|
13441
|
+
muting: {
|
13442
|
+
icon: 'camera',
|
13443
|
+
tooltip: 'Stopping video',
|
13444
|
+
state: i.DISABLED,
|
13445
|
+
text: 'Stopping...'
|
13446
|
+
},
|
13447
|
+
unmuting: {
|
13448
|
+
icon: 'camera-muted',
|
13449
|
+
tooltip: 'Starting video',
|
13450
|
+
state: i.DISABLED,
|
13451
|
+
text: 'Starting...'
|
13452
|
+
},
|
13453
|
+
noCamera: {
|
13454
|
+
icon: 'camera-muted',
|
13455
|
+
tooltip: 'No camera available',
|
13456
|
+
state: i.DISABLED,
|
13457
|
+
text: 'No camera'
|
13458
|
+
}
|
13427
13459
|
};
|
13428
13460
|
return this.adapter.getMeeting(meetingID).pipe(map(_ref => {
|
13429
13461
|
let {
|
13430
13462
|
localVideo: {
|
13431
|
-
stream
|
13463
|
+
stream,
|
13464
|
+
muting
|
13432
13465
|
},
|
13433
13466
|
disabledLocalVideo
|
13434
13467
|
} = _ref;
|
13435
|
-
return stream && unmuted || disabledLocalVideo && muted ||
|
13436
|
-
}), distinctUntilChanged(),
|
13468
|
+
return muting === true && STATES.muting || muting === false && STATES.unmuting || stream && STATES.unmuted || disabledLocalVideo && STATES.muted || STATES.noCamera;
|
13469
|
+
}), distinctUntilChanged(), map(state => ({ ...common,
|
13470
|
+
...state
|
13471
|
+
})), tap(display => logger.debug('MEETING', meetingID, 'VideoControl::display()', ['emitting', display])));
|
13437
13472
|
}
|
13438
13473
|
|
13439
13474
|
}
|
@@ -14098,6 +14133,35 @@ class MeetingsSDKAdapter extends d {
|
|
14098
14133
|
logger.error('MEETING', ID, 'leaveMeeting()', 'Unable to leave', error);
|
14099
14134
|
}
|
14100
14135
|
}
|
14136
|
+
/**
|
14137
|
+
* Returns the status of the specified local media (audio or video) in the form of an object
|
14138
|
+
* with the following mutually exclusive boolean properties:
|
14139
|
+
* - `unmuted` - the media is unmuted
|
14140
|
+
* - `muted` - the media is muted
|
14141
|
+
* - `muting` - the media is currently being muted
|
14142
|
+
* - `unmuting` - the media is currently being unmuted
|
14143
|
+
* - `disabled` - the media is disabled (there is no available media device)
|
14144
|
+
*
|
14145
|
+
* @param {object} localMedia The local media object from the meeting
|
14146
|
+
* @param {MediaStream|null} disabledLocalMedia The disabled media stream
|
14147
|
+
* @returns {{muting: boolean}|{unmuting: boolean}|{unmuted: boolean}|{muted: boolean}|{disabled: boolean}} The local media state
|
14148
|
+
*/
|
14149
|
+
// eslint-disable-next-line class-methods-use-this
|
14150
|
+
|
14151
|
+
|
14152
|
+
getLocalMediaState(localMedia, disabledLocalMedia) {
|
14153
|
+
return localMedia.muting === true && {
|
14154
|
+
muting: true
|
14155
|
+
} || localMedia.muting === false && {
|
14156
|
+
unmuting: true
|
14157
|
+
} || localMedia.stream && {
|
14158
|
+
unmuted: true
|
14159
|
+
} || disabledLocalMedia && {
|
14160
|
+
muted: true
|
14161
|
+
} || {
|
14162
|
+
disabled: true
|
14163
|
+
};
|
14164
|
+
}
|
14101
14165
|
/**
|
14102
14166
|
* Attempts to mute the microphone of the given meeting ID.
|
14103
14167
|
* If the microphone is successfully muted, an audio mute event is dispatched.
|
@@ -14111,15 +14175,42 @@ class MeetingsSDKAdapter extends d {
|
|
14111
14175
|
logger.debug('MEETING', ID, 'handleLocalAudio()', ['called with', {
|
14112
14176
|
ID
|
14113
14177
|
}]);
|
14178
|
+
let state; // local audio state
|
14179
|
+
// sanity checks and "(un)muting in-progress" state
|
14180
|
+
|
14181
|
+
await this.updateMeeting(ID, meeting => {
|
14182
|
+
let updates;
|
14183
|
+
state = this.getLocalMediaState(meeting.localAudio, meeting.disabledLocalAudio);
|
14184
|
+
|
14185
|
+
if (state.disabled) {
|
14186
|
+
throw new Error('Can\'t mute/unmute disabled audio');
|
14187
|
+
} else if (state.muting) {
|
14188
|
+
throw new Error('Already muting audio');
|
14189
|
+
} else if (state.unmuting) {
|
14190
|
+
throw new Error('Already unmuting audio');
|
14191
|
+
} else if (state.unmuted) {
|
14192
|
+
updates = {
|
14193
|
+
localAudio: {
|
14194
|
+
muting: true
|
14195
|
+
}
|
14196
|
+
};
|
14197
|
+
} else if (state.muted) {
|
14198
|
+
updates = {
|
14199
|
+
localAudio: {
|
14200
|
+
muting: false
|
14201
|
+
}
|
14202
|
+
};
|
14203
|
+
}
|
14204
|
+
|
14205
|
+
return updates;
|
14206
|
+
});
|
14114
14207
|
|
14115
14208
|
try {
|
14116
14209
|
await this.updateMeeting(ID, async (meeting, sdkMeeting) => {
|
14117
14210
|
const isInSession = !!meeting.remoteAudio;
|
14118
|
-
const audioDisabled = !!this.meetings[ID].disabledLocalAudio;
|
14119
|
-
const audioEnabled = !!meeting.localAudio.stream;
|
14120
14211
|
let updates;
|
14121
14212
|
|
14122
|
-
if (
|
14213
|
+
if (state.unmuted) {
|
14123
14214
|
// Mute the audio only if there is an active meeting
|
14124
14215
|
if (isInSession) {
|
14125
14216
|
logger.debug('MEETING', ID, 'handleLocalAudio()', 'calling sdkMeeting.muteAudio()');
|
@@ -14131,10 +14222,11 @@ class MeetingsSDKAdapter extends d {
|
|
14131
14222
|
updates = {
|
14132
14223
|
disabledLocalAudio: meeting.localAudio.stream,
|
14133
14224
|
localAudio: {
|
14134
|
-
stream: null
|
14225
|
+
stream: null,
|
14226
|
+
muting: undefined
|
14135
14227
|
}
|
14136
14228
|
};
|
14137
|
-
} else if (
|
14229
|
+
} else if (state.muted) {
|
14138
14230
|
// Unmute the audio only if there is an active meeting
|
14139
14231
|
if (isInSession) {
|
14140
14232
|
logger.debug('MEETING', ID, 'handleLocalAudio()', 'calling sdkMeeting.unmuteAudio()');
|
@@ -14146,7 +14238,8 @@ class MeetingsSDKAdapter extends d {
|
|
14146
14238
|
updates = {
|
14147
14239
|
disabledLocalAudio: null,
|
14148
14240
|
localAudio: {
|
14149
|
-
stream: meeting.disabledLocalAudio
|
14241
|
+
stream: meeting.disabledLocalAudio,
|
14242
|
+
muting: undefined
|
14150
14243
|
}
|
14151
14244
|
};
|
14152
14245
|
}
|
@@ -14158,6 +14251,11 @@ class MeetingsSDKAdapter extends d {
|
|
14158
14251
|
});
|
14159
14252
|
} catch (error) {
|
14160
14253
|
logger.error('MEETING', ID, 'handleLocalAudio()', 'Unable to update local audio settings', error);
|
14254
|
+
this.updateMeeting(ID, () => ({
|
14255
|
+
localAudio: {
|
14256
|
+
muting: undefined
|
14257
|
+
}
|
14258
|
+
}));
|
14161
14259
|
}
|
14162
14260
|
}
|
14163
14261
|
/**
|
@@ -14173,15 +14271,42 @@ class MeetingsSDKAdapter extends d {
|
|
14173
14271
|
logger.debug('MEETING', ID, 'handleLocalVideo()', ['called with', {
|
14174
14272
|
ID
|
14175
14273
|
}]);
|
14274
|
+
let state; // local video state
|
14275
|
+
// sanity checks and "(un)muting in-progress" state
|
14276
|
+
|
14277
|
+
await this.updateMeeting(ID, meeting => {
|
14278
|
+
let updates;
|
14279
|
+
state = this.getLocalMediaState(meeting.localVideo, meeting.disabledLocalVideo);
|
14280
|
+
|
14281
|
+
if (state.disabled) {
|
14282
|
+
throw new Error('Can\'t mute/unmute disabled video');
|
14283
|
+
} else if (state.muting) {
|
14284
|
+
throw new Error('Already muting video');
|
14285
|
+
} else if (state.unmuting) {
|
14286
|
+
throw new Error('Already unmuting video');
|
14287
|
+
} else if (state.unmuted) {
|
14288
|
+
updates = {
|
14289
|
+
localVideo: {
|
14290
|
+
muting: true
|
14291
|
+
}
|
14292
|
+
};
|
14293
|
+
} else if (state.muted) {
|
14294
|
+
updates = {
|
14295
|
+
localVideo: {
|
14296
|
+
muting: false
|
14297
|
+
}
|
14298
|
+
};
|
14299
|
+
}
|
14300
|
+
|
14301
|
+
return updates;
|
14302
|
+
});
|
14176
14303
|
|
14177
14304
|
try {
|
14178
14305
|
await this.updateMeeting(ID, async (meeting, sdkMeeting) => {
|
14179
14306
|
const isInSession = !!meeting.remoteVideo;
|
14180
|
-
const videoEnabled = !!meeting.localVideo.stream;
|
14181
|
-
const videoDisabled = !!meeting.disabledLocalVideo;
|
14182
14307
|
let updates;
|
14183
14308
|
|
14184
|
-
if (
|
14309
|
+
if (state.unmuted) {
|
14185
14310
|
// Mute the video only if there is an active meeting
|
14186
14311
|
if (isInSession) {
|
14187
14312
|
logger.debug('MEETING', ID, 'handleLocalVideo()', 'calling sdkMeeting.muteVideo()');
|
@@ -14191,12 +14316,13 @@ class MeetingsSDKAdapter extends d {
|
|
14191
14316
|
|
14192
14317
|
|
14193
14318
|
updates = {
|
14319
|
+
disabledLocalVideo: meeting.localVideo.stream,
|
14194
14320
|
localVideo: {
|
14195
|
-
stream: null
|
14196
|
-
|
14197
|
-
|
14321
|
+
stream: null,
|
14322
|
+
muting: undefined
|
14323
|
+
}
|
14198
14324
|
};
|
14199
|
-
} else if (
|
14325
|
+
} else if (state.muted) {
|
14200
14326
|
// Unmute the video only if there is an active meeting
|
14201
14327
|
if (isInSession) {
|
14202
14328
|
logger.debug('MEETING', ID, 'handleLocalVideo()', 'calling sdkMeeting.unmuteVideo()');
|
@@ -14206,10 +14332,11 @@ class MeetingsSDKAdapter extends d {
|
|
14206
14332
|
|
14207
14333
|
|
14208
14334
|
updates = {
|
14335
|
+
disabledLocalVideo: null,
|
14209
14336
|
localVideo: {
|
14210
|
-
stream: meeting.disabledLocalVideo
|
14211
|
-
|
14212
|
-
|
14337
|
+
stream: meeting.disabledLocalVideo,
|
14338
|
+
muting: undefined
|
14339
|
+
}
|
14213
14340
|
};
|
14214
14341
|
}
|
14215
14342
|
|
@@ -14220,6 +14347,11 @@ class MeetingsSDKAdapter extends d {
|
|
14220
14347
|
});
|
14221
14348
|
} catch (error) {
|
14222
14349
|
logger.error('MEETING', ID, 'handleLocalVideo()', 'Unable to update local video settings', error);
|
14350
|
+
this.updateMeeting(ID, () => ({
|
14351
|
+
localVideo: {
|
14352
|
+
muting: undefined
|
14353
|
+
}
|
14354
|
+
}));
|
14223
14355
|
}
|
14224
14356
|
}
|
14225
14357
|
/**
|
@@ -14611,15 +14743,14 @@ class MeetingsSDKAdapter extends d {
|
|
14611
14743
|
if (!(ID in this.getMeetingObservables)) {
|
14612
14744
|
const sdkMeeting = this.fetchMeeting(ID);
|
14613
14745
|
const getMeeting$ = Observable.create(observer => {
|
14614
|
-
if (this.meetings[ID]) {
|
14746
|
+
if (sdkMeeting && this.meetings[ID]) {
|
14615
14747
|
logger.debug('MEETING', ID, 'getMeeting()', ['initial meeting object', this.meetings[ID]]);
|
14616
14748
|
observer.next(this.meetings[ID]);
|
14749
|
+
observer.complete();
|
14617
14750
|
} else {
|
14618
14751
|
logger.error('MEETING', ID, 'getMeeting()', `Could not find meeting with ID "${ID}"`);
|
14619
14752
|
observer.error(new Error(`Could not find meeting with ID "${ID}"`));
|
14620
14753
|
}
|
14621
|
-
|
14622
|
-
observer.complete();
|
14623
14754
|
});
|
14624
14755
|
const meetingUpdateEvent$ = fromEvent(sdkMeeting, EVENT_MEETING_UPDATED).pipe(tap(() => logger.debug('MEETING', ID, 'getMeeting()', ['received', EVENT_MEETING_UPDATED, 'event'])), tap(meeting => {
|
14625
14756
|
this.meetings[ID] = meeting;
|
@@ -15116,7 +15247,7 @@ var defineProperty = defineProperty$1;
|
|
15116
15247
|
})(constants);
|
15117
15248
|
|
15118
15249
|
var name = "@webex/sdk-component-adapter";
|
15119
|
-
var version = "1.
|
15250
|
+
var version = "1.93.0";
|
15120
15251
|
const LOG_ARGS$1 = ['SDK-MEMBERSHIPS', `${name}-${version}`]; // max parameter value must be greater than 0 and less than or equal to 1000
|
15121
15252
|
|
15122
15253
|
const MAX_MEMBERSHIPS = 1000; // TODO: Figure out how to import JS Doc definitions and remove duplication.
|
@@ -16151,7 +16282,7 @@ var WebexMeeting = ii(ni(WebexMeetingWidget), function (props) {
|
|
16151
16282
|
},
|
16152
16283
|
config: {
|
16153
16284
|
appName: appName,
|
16154
|
-
appVersion: "1.20.
|
16285
|
+
appVersion: "1.20.8"
|
16155
16286
|
}
|
16156
16287
|
});
|
16157
16288
|
return new WebexSDKAdapter(webex);
|