@webex/widgets 1.22.1 → 1.24.0
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/README.md +20 -43
- package/dist/{assets → css/assets}/15592702.woff +0 -0
- package/dist/{assets → css/assets}/18609408.woff +0 -0
- package/dist/{assets → css/assets}/2ce7dd9e.woff2 +0 -0
- package/dist/{assets → css/assets}/2f4a9953.woff2 +0 -0
- package/dist/{assets → css/assets}/45dc7dcd.woff2 +0 -0
- package/dist/{assets → css/assets}/46a31acd.woff2 +0 -0
- package/dist/{assets → css/assets}/49e65cec.woff +0 -0
- package/dist/{assets → css/assets}/4a5e2b76.woff2 +0 -0
- package/dist/{assets → css/assets}/4fbe2ff6.woff +0 -0
- package/dist/{assets → css/assets}/521bbff9.woff2 +0 -0
- package/dist/{assets → css/assets}/5be282d2.woff +0 -0
- package/dist/{assets → css/assets}/5c1e91fe.woff +0 -0
- package/dist/{assets → css/assets}/6a79ddf2.woff2 +0 -0
- package/dist/{assets → css/assets}/6c0c2778.woff2 +0 -0
- package/dist/{assets → css/assets}/7f551bab.woff +0 -0
- package/dist/{assets → css/assets}/87960965.gif +0 -0
- package/dist/{assets → css/assets}/89721a2e.woff +0 -0
- package/dist/{assets → css/assets}/af1a3e22.svg +0 -0
- package/dist/{assets → css/assets}/c1f2fd26.woff +0 -0
- package/dist/{assets → css/assets}/cc2626a2.woff2 +0 -0
- package/dist/{assets → css/assets}/dc7f8e1b.gif +0 -0
- package/dist/{assets → css/assets}/dcdf6545.woff +0 -0
- package/dist/{assets → css/assets}/e2738dc5.woff2 +0 -0
- package/dist/{assets → css/assets}/ecaeee69.woff +0 -0
- package/dist/{assets → css/assets}/ee7d15d.woff +0 -0
- package/dist/{assets → css/assets}/f09be80b.woff2 +0 -0
- package/dist/{assets → css/assets}/f7e670d.woff +0 -0
- package/dist/{assets → css/assets}/f98de399.woff2 +0 -0
- package/dist/{assets → css/assets}/ff8c1c66.woff2 +0 -0
- package/dist/{webexWidgets.css → css/webex-widgets.css} +0 -0
- package/dist/webexWidgets.esm.js +145 -106
- package/dist/webexWidgets.esm.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
@@ -20,19 +20,9 @@
|
|
20
20
|
that follow the [Webex](https://www.webex.com) products experience,
|
21
21
|
aimed at developers that want to embed Webex into their applications.
|
22
22
|
|
23
|
-
## Project Status
|
24
|
-
|
25
|
-
The Webex Component System is considered to be in beta stage and it's not a generally available product from Webex at this time.
|
26
|
-
This means that the Webex Component System is available for everyone to use but breaking changes may occur as we develop it.
|
27
|
-
We try our best to minimize any breaking changes but they may occur.
|
28
|
-
While the Webex Component System is not a GA product, we still offer support through all regular channels.
|
29
|
-
However, bug priority is given to product already generally available.
|
30
|
-
We love for you to use the Webex Component System and be part of the feedback process!
|
31
|
-
|
32
23
|
## Table of Contents
|
33
24
|
|
34
25
|
- [Install](#install)
|
35
|
-
- [Webex Components vs Webex Widgets](#webex-components-vs-webex-widgets)
|
36
26
|
- [Usage](#usage)
|
37
27
|
- [Contributing](#contributing)
|
38
28
|
- [License](#license)
|
@@ -42,38 +32,17 @@ We love for you to use the Webex Component System and be part of the feedback pr
|
|
42
32
|
## Install
|
43
33
|
|
44
34
|
```bash
|
45
|
-
|
35
|
+
npx install-peerdeps @webex/widgets
|
46
36
|
```
|
47
37
|
|
48
|
-
|
49
|
-
has to be installed as a peer dependency.
|
50
|
-
|
51
|
-
## Webex Components vs Webex Widgets
|
52
|
-
|
53
|
-
In addition to the Webex Widgets, we also offer the
|
54
|
-
[Webex Component System](https://github.com/webex/components#webex-components).
|
55
|
-
The Webex Component System (sometimes shortened as _Webex Components_) is a set of
|
56
|
-
React components that, while following Webex styling, allow for more granularity
|
57
|
-
in terms of layout and source of data.
|
58
|
-
To learn more on the Webex Component System head to its Github repository at
|
59
|
-
https://github.com/webex/components.
|
60
|
-
|
61
|
-
Webex Widgets are based on Webex Components but include the adapter that uses
|
62
|
-
our [Javascript SDK](https://github.com/webex/webex-js-sdk) to talk to Webex services for you.
|
63
|
-
This means that the Webex Widgets use the
|
64
|
-
[SDK Component Adapter](https://github.com/webex/sdk-component-adapter#webex-sdk-component-adapter)
|
65
|
-
to inject the Webex data.
|
66
|
-
All you need is a valid access token and a few parameters based on the widget you want to use.
|
67
|
-
|
68
|
-
You have to take the Widget layout as-is, but the benefit is that there are no configurations needed.
|
69
|
-
Install, copy-paste and you have the power of Webex in your application!
|
38
|
+
This will install the Widgets package, peer dependencies and dependencies.
|
70
39
|
|
71
40
|
## Usage
|
72
41
|
|
73
42
|
### Styles
|
74
43
|
|
75
44
|
In order to properly style Webex Widgets, you will need to import our CSS separately.
|
76
|
-
Import `@webex/widgets/dist/
|
45
|
+
Import `@webex/widgets/dist/css/webex-widgets.css` into your main entry file.
|
77
46
|
|
78
47
|
There are two ways to do this:
|
79
48
|
|
@@ -82,7 +51,7 @@ There are two ways to do this:
|
|
82
51
|
In your `App.js[x]`, add the following import:
|
83
52
|
|
84
53
|
```js
|
85
|
-
import '@webex/widgets/dist/
|
54
|
+
import '@webex/widgets/dist/css/webex-widgets.css';
|
86
55
|
|
87
56
|
...
|
88
57
|
```
|
@@ -95,7 +64,7 @@ In the `<head>` tag of your `index.html`, add the following tag:
|
|
95
64
|
<head>
|
96
65
|
...
|
97
66
|
|
98
|
-
<link rel="stylesheet" type="text/css" href="node_modules/@webex/widgets/dist/
|
67
|
+
<link rel="stylesheet" type="text/css" href="node_modules/@webex/widgets/dist/css/webex-widgets.css" />
|
99
68
|
</head>
|
100
69
|
```
|
101
70
|
|
@@ -105,26 +74,34 @@ reference accordingly.
|
|
105
74
|
|
106
75
|
### Widgets
|
107
76
|
|
108
|
-
Please make sure to install the [Webex
|
109
|
-
along with the [Webex Widget](https://www.npmjs.com/package/@webex/widgets) package.
|
77
|
+
Please make sure to install the [Webex Widget](https://www.npmjs.com/package/@webex/widgets) package and related dependencies.
|
110
78
|
|
111
79
|
```bash
|
112
|
-
|
80
|
+
npx install-peerdeps @webex/widgets
|
113
81
|
```
|
114
82
|
|
115
83
|
To use a Webex Widget, simply import the desired widget and render it into your React application.
|
116
84
|
|
117
85
|
```js
|
118
|
-
import
|
119
|
-
import {WebexMeetingWidget} from '@webex/widgets';
|
86
|
+
import {WebexMeetingsWidget} from '@webex/widgets';
|
120
87
|
|
121
|
-
import '@webex/widgets/dist/
|
88
|
+
import '@webex/widgets/dist/css/webex-widgets.css';
|
122
89
|
|
123
90
|
export default function App() {
|
124
|
-
return
|
91
|
+
return (
|
92
|
+
<WebexMeetingsWidget
|
93
|
+
style={{width: "1000px", height: "500px"}} // Substitute with any arbitrary size or use `className`
|
94
|
+
accessToken="<ACCESS_TOKEN>"
|
95
|
+
meetingDestination="<MEETING_DESTINATION>"
|
96
|
+
/>
|
97
|
+
);
|
125
98
|
}
|
126
99
|
```
|
127
100
|
|
101
|
+
Available widgets from this package are:
|
102
|
+
|
103
|
+
- [Webex Meetings widget](https://github.com/webex/widgets/tree/master/src/widgets/WebexMeetings#webex-meetings-widget)
|
104
|
+
|
128
105
|
## Contributing
|
129
106
|
|
130
107
|
We'd love for you to contribute to our source code and to make the Webex Widgets even better than they are today!
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
package/dist/webexWidgets.esm.js
CHANGED
@@ -10747,14 +10747,14 @@ var Ca = function (e) {
|
|
10747
10747
|
|
10748
10748
|
if (i) {
|
10749
10749
|
var t = function () {
|
10750
|
-
d(!0);
|
10750
|
+
return d(!0);
|
10751
10751
|
},
|
10752
10752
|
n = function () {
|
10753
|
-
d(!1);
|
10753
|
+
return d(!1);
|
10754
10754
|
};
|
10755
10755
|
|
10756
|
-
i.addEventListener("
|
10757
|
-
i.removeEventListener("
|
10756
|
+
i.addEventListener("touchstart", t), i.addEventListener("touchend", n), i.addEventListener("mouseenter", t), i.addEventListener("mouseleave", n), i.addEventListener("click", n), e = function () {
|
10757
|
+
i.removeEventListener("touchstart", t), i.removeEventListener("touchend", n), i.removeEventListener("mouseenter", t), i.removeEventListener("mouseleave", n), i.removeEventListener("click", n);
|
10758
10758
|
};
|
10759
10759
|
}
|
10760
10760
|
|
@@ -12704,7 +12704,113 @@ performance.now || performance.mozNow || performance.msNow || performance.oNow |
|
|
12704
12704
|
return new Date().getTime();
|
12705
12705
|
}; // generate timestamp or delta
|
12706
12706
|
|
12707
|
+
/**
|
12708
|
+
* Custom rxjs operator for chaining dependent observables.
|
12709
|
+
* Usage:
|
12710
|
+
```js
|
12711
|
+
obs.pipe(
|
12712
|
+
chainWith((lastMessage) => createDependentObservable(lastMessage),
|
12713
|
+
);
|
12714
|
+
```
|
12715
|
+
*
|
12716
|
+
* @param {function(lastMessage): Observable} createDependentObservable Function that is passed the last message emitted by the source observable and returns a new observable
|
12717
|
+
* @returns {Observable} observable
|
12718
|
+
*/
|
12719
|
+
|
12720
|
+
|
12721
|
+
function chainWith(createDependentObservable) {
|
12722
|
+
return source => new Observable(subscriber => {
|
12723
|
+
let lastValue;
|
12724
|
+
let subscription;
|
12725
|
+
subscription = source.subscribe(value => {
|
12726
|
+
subscriber.next(value);
|
12727
|
+
lastValue = value;
|
12728
|
+
}, error => subscriber.error(error), () => {
|
12729
|
+
subscription = createDependentObservable(lastValue).subscribe(value => subscriber.next(value), error => subscriber.error(error), () => subscriber.complete());
|
12730
|
+
});
|
12731
|
+
return () => {
|
12732
|
+
if (subscription) {
|
12733
|
+
subscription.unsubscribe();
|
12734
|
+
}
|
12735
|
+
};
|
12736
|
+
});
|
12737
|
+
}
|
12738
|
+
/**
|
12739
|
+
* Custom rxjs operator that works like combineLatest, but emits even if some of the source observables haven't emitted yet.
|
12740
|
+
* Usage:
|
12741
|
+
```js
|
12742
|
+
combineLatestImmediate(obs1, obs2, ...);
|
12743
|
+
```
|
12744
|
+
*
|
12745
|
+
* @param {ObservableInput} [observables] An array of input Observables to combine with each other.
|
12746
|
+
* @returns {Observable} Observable that emits arrays containing the last emitted value from each of the observables defined above.
|
12747
|
+
*/
|
12748
|
+
|
12749
|
+
|
12750
|
+
function combineLatestImmediate() {
|
12751
|
+
for (var _len = arguments.length, observables = new Array(_len), _key = 0; _key < _len; _key++) {
|
12752
|
+
observables[_key] = arguments[_key];
|
12753
|
+
}
|
12754
|
+
|
12755
|
+
return combineLatest(observables.map(obs => obs.pipe(startWith(undefined))));
|
12756
|
+
}
|
12757
|
+
/**
|
12758
|
+
* Helper function for deep merge on objects.
|
12759
|
+
*
|
12760
|
+
* @param {object} dest - The destination object.
|
12761
|
+
* @param {object} src - The source object.
|
12762
|
+
*/
|
12763
|
+
|
12764
|
+
|
12765
|
+
function deepMerge(dest, src) {
|
12766
|
+
const result = dest;
|
12767
|
+
|
12768
|
+
for (const [key, val] of Object.entries(src || {})) {
|
12769
|
+
if (val && val.constructor === Object) {
|
12770
|
+
deepMerge(result[key], val);
|
12771
|
+
} else {
|
12772
|
+
result[key] = val;
|
12773
|
+
}
|
12774
|
+
}
|
12775
|
+
}
|
12776
|
+
/**
|
12777
|
+
* Safe JSON stringifier that:
|
12778
|
+
* - replaces circular references with the text [circular-reference]
|
12779
|
+
* - catches any JSON.stringify error and returns [error-stringifying:<ERROR-MESSAGE>]
|
12780
|
+
*
|
12781
|
+
* @param {any} data Data to be stringified
|
12782
|
+
* @param {function} [replacer] JSON.stringify() replacer parameter
|
12783
|
+
* @param {string|number} [space] JSON.stringify() space parameter
|
12784
|
+
* @returns {string} The string result
|
12785
|
+
*/
|
12786
|
+
|
12787
|
+
|
12788
|
+
function safeJsonStringify(data, replacer, space) {
|
12789
|
+
const seen = new WeakSet();
|
12790
|
+
let str;
|
12791
|
+
|
12792
|
+
try {
|
12793
|
+
str = JSON.stringify(data, (key, value) => {
|
12794
|
+
let replaced = replacer ? replacer(key, value) : value;
|
12795
|
+
|
12796
|
+
if (typeof replaced === 'object' && replaced !== null) {
|
12797
|
+
if (seen.has(replaced)) {
|
12798
|
+
replaced = '[circular-reference]';
|
12799
|
+
} else {
|
12800
|
+
seen.add(replaced);
|
12801
|
+
}
|
12802
|
+
}
|
12803
|
+
|
12804
|
+
return replaced;
|
12805
|
+
}, space);
|
12806
|
+
} catch (error) {
|
12807
|
+
str = `[error-stringifying:${error.message}]`;
|
12808
|
+
}
|
12809
|
+
|
12810
|
+
return str;
|
12811
|
+
}
|
12707
12812
|
|
12813
|
+
const isSpeakerSupported = !!document.createElement('audio').setSinkId;
|
12708
12814
|
const logFormat = format.printf(_ref => {
|
12709
12815
|
let {
|
12710
12816
|
timestamp,
|
@@ -12718,7 +12824,7 @@ const logFormat = format.printf(_ref => {
|
|
12718
12824
|
let msgString = message;
|
12719
12825
|
|
12720
12826
|
if (Array.isArray(message)) {
|
12721
|
-
msgString = message.map(item => typeof item === 'string' && item ||
|
12827
|
+
msgString = message.map(item => typeof item === 'string' && item || safeJsonStringify(item, (key, value) => value instanceof MediaStream && `MediaStream([${value.getTracks().map(track => track.kind)}])` || value, 2)).join(' ');
|
12722
12828
|
}
|
12723
12829
|
|
12724
12830
|
return `${timestamp} ${level} ${resourceType} ${resourceID} ${action} ${msgString} ${error ? ` ${error.stack || error}` : ''}`;
|
@@ -13396,77 +13502,6 @@ class ShareControl extends MeetingControl {
|
|
13396
13502
|
}
|
13397
13503
|
|
13398
13504
|
}
|
13399
|
-
/**
|
13400
|
-
* Custom rxjs operator for chaining dependent observables.
|
13401
|
-
* Usage:
|
13402
|
-
```js
|
13403
|
-
obs.pipe(
|
13404
|
-
chainWith((lastMessage) => createDependentObservable(lastMessage),
|
13405
|
-
);
|
13406
|
-
```
|
13407
|
-
*
|
13408
|
-
* @param {function(lastMessage): Observable} createDependentObservable Function that is passed the last message emitted by the source observable and returns a new observable
|
13409
|
-
* @returns {Observable} observable
|
13410
|
-
*/
|
13411
|
-
|
13412
|
-
|
13413
|
-
function chainWith(createDependentObservable) {
|
13414
|
-
return source => new Observable(subscriber => {
|
13415
|
-
let lastValue;
|
13416
|
-
let subscription;
|
13417
|
-
subscription = source.subscribe(value => {
|
13418
|
-
subscriber.next(value);
|
13419
|
-
lastValue = value;
|
13420
|
-
}, error => subscriber.error(error), () => {
|
13421
|
-
subscription = createDependentObservable(lastValue).subscribe(value => subscriber.next(value), error => subscriber.error(error), () => subscriber.complete());
|
13422
|
-
});
|
13423
|
-
return () => {
|
13424
|
-
if (subscription) {
|
13425
|
-
subscription.unsubscribe();
|
13426
|
-
}
|
13427
|
-
};
|
13428
|
-
});
|
13429
|
-
}
|
13430
|
-
/**
|
13431
|
-
* Custom rxjs operator that works like combineLatest, but emits even if some of the source observables haven't emitted yet.
|
13432
|
-
* Usage:
|
13433
|
-
```js
|
13434
|
-
combineLatestImmediate(obs1, obs2, ...);
|
13435
|
-
```
|
13436
|
-
*
|
13437
|
-
* @param {ObservableInput} [observables] An array of input Observables to combine with each other.
|
13438
|
-
* @returns {Observable} Observable that emits arrays containing the last emitted value from each of the observables defined above.
|
13439
|
-
*/
|
13440
|
-
|
13441
|
-
|
13442
|
-
function combineLatestImmediate() {
|
13443
|
-
for (var _len = arguments.length, observables = new Array(_len), _key = 0; _key < _len; _key++) {
|
13444
|
-
observables[_key] = arguments[_key];
|
13445
|
-
}
|
13446
|
-
|
13447
|
-
return combineLatest(observables.map(obs => obs.pipe(startWith(undefined))));
|
13448
|
-
}
|
13449
|
-
/**
|
13450
|
-
* Helper function for deep merge on objects.
|
13451
|
-
*
|
13452
|
-
* @param {object} dest - The destination object.
|
13453
|
-
* @param {object} src - The source object.
|
13454
|
-
*/
|
13455
|
-
|
13456
|
-
|
13457
|
-
function deepMerge(dest, src) {
|
13458
|
-
const result = dest;
|
13459
|
-
|
13460
|
-
for (const [key, val] of Object.entries(src || {})) {
|
13461
|
-
if (val && val.constructor === Object) {
|
13462
|
-
deepMerge(result[key], val);
|
13463
|
-
} else {
|
13464
|
-
result[key] = val;
|
13465
|
-
}
|
13466
|
-
}
|
13467
|
-
}
|
13468
|
-
|
13469
|
-
const isSpeakerSupported = !!document.createElement('audio').setSinkId;
|
13470
13505
|
/**
|
13471
13506
|
* Display options of a meeting control.
|
13472
13507
|
*
|
@@ -13474,6 +13509,7 @@ const isSpeakerSupported = !!document.createElement('audio').setSinkId;
|
|
13474
13509
|
* @see {@link https://github.com/webex/component-adapter-interfaces/blob/master/src/MeetingsAdapter.js#L58}
|
13475
13510
|
*/
|
13476
13511
|
|
13512
|
+
|
13477
13513
|
class SwitchCameraControl extends MeetingControl {
|
13478
13514
|
/**
|
13479
13515
|
* Calls the action of the switch camera control.
|
@@ -13500,7 +13536,7 @@ class SwitchCameraControl extends MeetingControl {
|
|
13500
13536
|
meetingID
|
13501
13537
|
}]);
|
13502
13538
|
const cameraID$ = this.adapter.getMeeting(meetingID).pipe(map(meeting => meeting.cameraID), distinctUntilChanged());
|
13503
|
-
const options$ =
|
13539
|
+
const options$ = this.adapter.getAvailableDevices(meetingID, 'videoinput').pipe(map(availableCameras => availableCameras.map(camera => ({
|
13504
13540
|
value: camera.deviceId,
|
13505
13541
|
label: camera.label
|
13506
13542
|
}))));
|
@@ -13553,7 +13589,7 @@ class SwitchMicrophoneControl extends MeetingControl {
|
|
13553
13589
|
meetingID
|
13554
13590
|
}]);
|
13555
13591
|
const microphoneID$ = this.adapter.getMeeting(meetingID).pipe(map(meeting => meeting.microphoneID), distinctUntilChanged());
|
13556
|
-
const options$ =
|
13592
|
+
const options$ = this.adapter.getAvailableDevices(meetingID, 'audioinput').pipe(map(availableMicrophones => availableMicrophones.map(microphone => ({
|
13557
13593
|
value: microphone.deviceId,
|
13558
13594
|
label: microphone.label
|
13559
13595
|
}))));
|
@@ -13606,7 +13642,7 @@ class SwitchSpeakerControl extends MeetingControl {
|
|
13606
13642
|
meetingID
|
13607
13643
|
}]);
|
13608
13644
|
const speakerID$ = this.adapter.getMeeting(meetingID).pipe(map(meeting => meeting.speakerID), distinctUntilChanged());
|
13609
|
-
const options$ =
|
13645
|
+
const options$ = this.adapter.getAvailableDevices(meetingID, 'audiooutput').pipe(map(availableSpeakers => availableSpeakers.map(speaker => ({
|
13610
13646
|
value: speaker.deviceId,
|
13611
13647
|
label: speaker.label
|
13612
13648
|
}))), map(options => [{
|
@@ -13930,7 +13966,7 @@ class MeetingsSDKAdapter extends d {
|
|
13930
13966
|
}
|
13931
13967
|
}, 2000);
|
13932
13968
|
const [localStream] = await sdkMeeting.getMediaStreams(mediaDirection, audioVideo);
|
13933
|
-
const availableDevices = await
|
13969
|
+
const availableDevices = await navigator.mediaDevices.enumerateDevices();
|
13934
13970
|
const [{
|
13935
13971
|
label: deviceLabel
|
13936
13972
|
}] = localStream.getTracks();
|
@@ -13962,10 +13998,7 @@ class MeetingsSDKAdapter extends d {
|
|
13962
13998
|
if (!ignored) {
|
13963
13999
|
let perm;
|
13964
14000
|
const ee = error.error;
|
13965
|
-
logger.error('MEETING', ID, 'getStream()',
|
13966
|
-
mediaDirection,
|
13967
|
-
audioVideo
|
13968
|
-
}], ee);
|
14001
|
+
logger.error('MEETING', ID, 'getStream()', 'Unable to retrieve local media stream', ee || error);
|
13969
14002
|
|
13970
14003
|
if (ee instanceof DOMException) {
|
13971
14004
|
if (ee.name === 'NotAllowedError') {
|
@@ -14019,35 +14052,38 @@ class MeetingsSDKAdapter extends d {
|
|
14019
14052
|
});
|
14020
14053
|
}
|
14021
14054
|
/**
|
14022
|
-
*
|
14055
|
+
* Emits available media devices.
|
14056
|
+
* If the user did no grant access to media (browser and OS), the returned observable
|
14057
|
+
* will emit an empty array.
|
14023
14058
|
*
|
14024
|
-
* @param {string} ID
|
14025
|
-
* @param {'videoinput'|'audioinput'|'audiooutput'}
|
14059
|
+
* @param {string} ID Id of the meeting
|
14060
|
+
* @param {'videoinput'|'audioinput'|'audiooutput'} type String specifying the device type.
|
14026
14061
|
* See {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo/kind|MDN}
|
14027
|
-
* @returns {MediaDeviceInfo[]}
|
14062
|
+
* @returns {Observable<MediaDeviceInfo[]>} Observable that emits arrays containing media devices.
|
14028
14063
|
* @private
|
14029
14064
|
*/
|
14030
|
-
// eslint-disable-next-line class-methods-use-this
|
14031
14065
|
|
14032
14066
|
|
14033
|
-
|
14067
|
+
getAvailableDevices(ID, type) {
|
14034
14068
|
logger.debug('MEETING', ID, 'getAvailableDevices()', ['called with', {
|
14035
14069
|
ID,
|
14036
14070
|
type
|
14037
14071
|
}]);
|
14038
|
-
let devices;
|
14039
14072
|
|
14040
|
-
|
14041
|
-
|
14042
|
-
|
14043
|
-
|
14044
|
-
|
14045
|
-
|
14046
|
-
|
14047
|
-
|
14073
|
+
const getDevices = async () => {
|
14074
|
+
let devices = [];
|
14075
|
+
|
14076
|
+
try {
|
14077
|
+
devices = await this.fetchMeeting(ID).getDevices();
|
14078
|
+
devices = devices.filter(device => !type || device.kind === type && device.deviceId);
|
14079
|
+
} catch (error) {
|
14080
|
+
logger.error('MEETING', ID, 'getAvailableDevices()', 'Unable to retrieve devices', error);
|
14081
|
+
}
|
14082
|
+
|
14083
|
+
return devices;
|
14084
|
+
};
|
14048
14085
|
|
14049
|
-
logger.debug('MEETING', ID, 'getAvailabelDevices()', ['
|
14050
|
-
return devices;
|
14086
|
+
return this.getMeeting(ID).pipe(map(meeting => type !== 'videoinput' && type !== 'audioinput' || type === 'videoinput' && meeting.localVideo.permission === 'ALLOWED' || type === 'audioinput' && meeting.localAudio.permission === 'ALLOWED'), distinctUntilChanged(), concatMap(allowed => from(allowed ? getDevices() : [[]])), tap(devices => logger.debug('MEETING', ID, 'getAvailabelDevices()', ['emitting', devices])));
|
14051
14087
|
}
|
14052
14088
|
/**
|
14053
14089
|
* Update the meeting object with media attached based on a given event type.
|
@@ -14111,21 +14147,24 @@ class MeetingsSDKAdapter extends d {
|
|
14111
14147
|
|
14112
14148
|
case MEDIA_TYPE_REMOTE_SHARE:
|
14113
14149
|
this.meetings[ID] = { ...meeting,
|
14114
|
-
remoteShareStream: stream
|
14150
|
+
remoteShareStream: stream,
|
14151
|
+
remoteShare: meeting.remoteSharing ? stream : null
|
14115
14152
|
};
|
14116
14153
|
break;
|
14117
14154
|
|
14118
14155
|
case EVENT_REMOTE_SHARE_START:
|
14119
14156
|
// Only activate the remote stream when get get the start notification
|
14120
14157
|
this.meetings[ID] = { ...meeting,
|
14121
|
-
remoteShare: meeting.remoteShareStream
|
14158
|
+
remoteShare: meeting.remoteShareStream || null,
|
14159
|
+
remoteSharing: true
|
14122
14160
|
};
|
14123
14161
|
break;
|
14124
14162
|
|
14125
14163
|
case EVENT_REMOTE_SHARE_STOP:
|
14126
14164
|
// Remove remote share on stop event
|
14127
14165
|
this.meetings[ID] = { ...meeting,
|
14128
|
-
remoteShare: null
|
14166
|
+
remoteShare: null,
|
14167
|
+
remoteSharing: false
|
14129
14168
|
};
|
14130
14169
|
break;
|
14131
14170
|
}
|
@@ -15529,7 +15568,7 @@ var defineProperty = defineProperty$1;
|
|
15529
15568
|
})(constants);
|
15530
15569
|
|
15531
15570
|
var name = "@webex/sdk-component-adapter";
|
15532
|
-
var version = "1.
|
15571
|
+
var version = "1.97.1";
|
15533
15572
|
const LOG_ARGS$1 = ['SDK-MEMBERSHIPS', `${name}-${version}`]; // max parameter value must be greater than 0 and less than or equal to 1000
|
15534
15573
|
|
15535
15574
|
const MAX_MEMBERSHIPS = 1000; // TODO: Figure out how to import JS Doc definitions and remove duplication.
|
@@ -16571,7 +16610,7 @@ var WebexMeetings = si(ai(WebexMeetingsWidget), function (props) {
|
|
16571
16610
|
},
|
16572
16611
|
config: {
|
16573
16612
|
appName: appName,
|
16574
|
-
appVersion:
|
16613
|
+
appVersion: "1.23.0"
|
16575
16614
|
}
|
16576
16615
|
});
|
16577
16616
|
return new WebexSDKAdapter(webex);
|