@webex/media-helpers 3.10.0-wxc-disconnect.1 → 3.11.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.
@@ -1 +1 @@
1
- {"version":3,"names":["FacingMode","exports","DisplaySurface","PresetCameraConstraints","frameRate","width","height"],"sources":["constants.ts"],"sourcesContent":["import {VideoDeviceConstraints} from '@webex/internal-media-core';\n\nexport enum FacingMode {\n user = 'user',\n environment = 'environment',\n}\n\n// can be used later on when we add constraints in create display track\nexport enum DisplaySurface {\n browser = 'browser',\n monitor = 'monitor',\n window = 'window',\n}\n\nexport const PresetCameraConstraints: {[key: string]: VideoDeviceConstraints} = {\n '1080p': {frameRate: 30, width: 1920, height: 1080},\n\n '720p': {frameRate: 30, width: 1280, height: 720},\n\n '480p': {frameRate: 30, width: 640, height: 480},\n\n '360p': {frameRate: 30, width: 640, height: 360},\n\n '240p': {frameRate: 30, width: 320, height: 240},\n\n '180p': {frameRate: 30, width: 320, height: 180},\n\n '120p': {frameRate: 30, width: 160, height: 120},\n};\n"],"mappings":";;;;;;;IAEYA,UAAU,GAAAC,OAAA,CAAAD,UAAA,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA,OAKtB;AAAA,IACYE,cAAc,GAAAD,OAAA,CAAAC,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAMnB,IAAMC,uBAAgE,GAAAF,OAAA,CAAAE,uBAAA,GAAG;EAC9E,OAAO,EAAE;IAACC,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAI,CAAC;EAEnD,MAAM,EAAE;IAACF,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAG,CAAC;EAEjD,MAAM,EAAE;IAACF,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG,CAAC;EAEhD,MAAM,EAAE;IAACF,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG,CAAC;EAEhD,MAAM,EAAE;IAACF,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG,CAAC;EAEhD,MAAM,EAAE;IAACF,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG,CAAC;EAEhD,MAAM,EAAE;IAACF,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG;AACjD,CAAC"}
1
+ {"version":3,"names":["FacingMode","exports","DisplaySurface","PresetCameraConstraints","frameRate","width","height"],"sources":["constants.ts"],"sourcesContent":["import {VideoDeviceConstraints} from '@webex/internal-media-core';\n\nexport enum FacingMode {\n user = 'user',\n environment = 'environment',\n}\n\n// can be used later on when we add constraints in create display track\nexport enum DisplaySurface {\n browser = 'browser',\n monitor = 'monitor',\n window = 'window',\n}\n\nexport const PresetCameraConstraints: {[key: string]: VideoDeviceConstraints} = {\n '1080p': {frameRate: 30, width: 1920, height: 1080},\n\n '720p': {frameRate: 30, width: 1280, height: 720},\n\n '480p': {frameRate: 30, width: 640, height: 480},\n\n '360p': {frameRate: 30, width: 640, height: 360},\n\n '240p': {frameRate: 30, width: 320, height: 240},\n\n '180p': {frameRate: 30, width: 320, height: 180},\n\n '120p': {frameRate: 30, width: 160, height: 120},\n};\n"],"mappings":";;;;;;;IAEYA,UAAU,GAAAC,OAAA,CAAAD,UAAA,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA,OAKtB;AAAA,IACYE,cAAc,GAAAD,OAAA,CAAAC,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAMnB,IAAMC,uBAAgE,GAAAF,OAAA,CAAAE,uBAAA,GAAG;EAC9E,OAAO,EAAE;IAACC,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAI,CAAC;EAEnD,MAAM,EAAE;IAACF,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAG,CAAC;EAEjD,MAAM,EAAE;IAACF,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG,CAAC;EAEhD,MAAM,EAAE;IAACF,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG,CAAC;EAEhD,MAAM,EAAE;IAACF,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG,CAAC;EAEhD,MAAM,EAAE;IAACF,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG,CAAC;EAEhD,MAAM,EAAE;IAACF,SAAS,EAAE,EAAE;IAAEC,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG;AACjD,CAAC","ignoreList":[]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_webrtcCore","require","_webMediaEffects","_constants"],"sources":["index.ts"],"sourcesContent":["export {\n getDevices,\n LocalStream,\n LocalDisplayStream,\n LocalSystemAudioStream,\n LocalStreamEventNames,\n StreamEventNames,\n RemoteStream,\n RemoteStreamEventNames,\n type ServerMuteReason,\n LocalMicrophoneStreamEventNames,\n LocalCameraStreamEventNames,\n LocalMicrophoneStream,\n LocalCameraStream,\n createMicrophoneStream,\n createCameraStream,\n createCameraAndMicrophoneStreams,\n createDisplayStream,\n createDisplayStreamWithAudio,\n createDisplayMedia,\n type VideoContentHint,\n type StreamState,\n} from './webrtc-core';\n\nexport {NoiseReductionEffect, VirtualBackgroundEffect} from '@webex/web-media-effects';\nexport type {\n NoiseReductionEffectOptions,\n VirtualBackgroundEffectOptions,\n} from '@webex/web-media-effects';\n\nexport {FacingMode, DisplaySurface, PresetCameraConstraints} from './constants';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAwBA,IAAAC,gBAAA,GAAAD,OAAA;AAMA,IAAAE,UAAA,GAAAF,OAAA"}
1
+ {"version":3,"names":["_webrtcCore","require","_webMediaEffects","_constants"],"sources":["index.ts"],"sourcesContent":["export {\n getDevices,\n LocalStream,\n LocalDisplayStream,\n LocalSystemAudioStream,\n LocalStreamEventNames,\n StreamEventNames,\n RemoteStream,\n RemoteStreamEventNames,\n type ServerMuteReason,\n LocalMicrophoneStreamEventNames,\n LocalCameraStreamEventNames,\n LocalMicrophoneStream,\n LocalCameraStream,\n createMicrophoneStream,\n createCameraStream,\n createCameraAndMicrophoneStreams,\n createDisplayStream,\n createDisplayStreamWithAudio,\n createDisplayMedia,\n type VideoContentHint,\n type StreamState,\n} from './webrtc-core';\n\nexport {NoiseReductionEffect, VirtualBackgroundEffect} from '@webex/web-media-effects';\nexport type {\n NoiseReductionEffectOptions,\n VirtualBackgroundEffectOptions,\n} from '@webex/web-media-effects';\n\nexport {FacingMode, DisplaySurface, PresetCameraConstraints} from './constants';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAwBA,IAAAC,gBAAA,GAAAD,OAAA;AAMA,IAAAE,UAAA,GAAAF,OAAA","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import { AudioDeviceConstraints, LocalDisplayStream, LocalSystemAudioStream, LocalMicrophoneStream as WcmeLocalMicrophoneStream, LocalCameraStream as WcmeLocalCameraStream, VideoContentHint, VideoDeviceConstraints } from '@webex/internal-media-core';
2
2
  import { TypedEvent, WithEventsDummyType } from '@webex/ts-events';
3
- export { getDevices, LocalStream, LocalDisplayStream, LocalSystemAudioStream, LocalStreamEventNames, StreamEventNames, RemoteStream, RemoteStreamEventNames, type VideoContentHint, type StreamState, } from '@webex/internal-media-core';
3
+ export { getDevices, LocalStream, LocalDisplayStream, LocalSystemAudioStream, LocalStreamEventNames, StreamEventNames, RemoteStream, RemoteStreamEventNames, type VideoContentHint, type StreamState, type InboundAudioIssueEvent, InboundAudioIssueSubTypes, } from '@webex/internal-media-core';
4
4
  export type ServerMuteReason = 'remotelyMuted' | 'clientRequestFailed' | 'localUnmuteRequired';
5
5
  export declare enum LocalMicrophoneStreamEventNames {
6
6
  ServerMuted = "muted:byServer"
@@ -11,6 +11,12 @@ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequ
11
11
  _Object$defineProperty(exports, "__esModule", {
12
12
  value: true
13
13
  });
14
+ _Object$defineProperty(exports, "InboundAudioIssueSubTypes", {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _internalMediaCore.InboundAudioIssueSubTypes;
18
+ }
19
+ });
14
20
  exports.LocalCameraStreamEventNames = exports.LocalCameraStream = void 0;
15
21
  _Object$defineProperty(exports, "LocalDisplayStream", {
16
22
  enumerable: true,
@@ -64,11 +70,10 @@ _Object$defineProperty(exports, "getDevices", {
64
70
  });
65
71
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
66
72
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
67
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
68
- var _get2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/get"));
69
- var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
70
73
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
71
74
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
75
+ var _get2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/get"));
76
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
72
77
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
73
78
  var _internalMediaCore = require("@webex/internal-media-core");
74
79
  var _tsEvents = require("@webex/ts-events");
@@ -78,8 +83,9 @@ var _LocalMicrophoneStrea, _LocalCameraStreamEve;
78
83
  /* eslint-disable require-jsdoc */
79
84
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
80
85
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
81
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
82
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
86
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
87
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
88
+ function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
83
89
  // server forced the client to be unmuted
84
90
  // these events are in addition to WCME events. This will be properly typed once webrtc-core event types inheritance is fixed
85
91
  var LocalMicrophoneStreamEventNames = exports.LocalMicrophoneStreamEventNames = /*#__PURE__*/function (LocalMicrophoneStreamEventNames) {
@@ -92,20 +98,19 @@ var LocalCameraStreamEventNames = exports.LocalCameraStreamEventNames = /*#__PUR
92
98
  }({});
93
99
  _LocalMicrophoneStrea = LocalMicrophoneStreamEventNames.ServerMuted;
94
100
  var _LocalMicrophoneStream = /*#__PURE__*/function (_WcmeLocalMicrophoneS) {
95
- (0, _inherits2.default)(_LocalMicrophoneStream, _WcmeLocalMicrophoneS);
96
- var _super = _createSuper(_LocalMicrophoneStream);
97
101
  function _LocalMicrophoneStream() {
98
102
  var _this;
99
103
  (0, _classCallCheck2.default)(this, _LocalMicrophoneStream);
100
104
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
101
105
  args[_key] = arguments[_key];
102
106
  }
103
- _this = _super.call.apply(_super, [this].concat(args));
104
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "unmuteAllowed", true);
105
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), _LocalMicrophoneStrea, new _tsEvents.TypedEvent());
107
+ _this = _callSuper(this, _LocalMicrophoneStream, [].concat(args));
108
+ (0, _defineProperty2.default)(_this, "unmuteAllowed", true);
109
+ (0, _defineProperty2.default)(_this, _LocalMicrophoneStrea, new _tsEvents.TypedEvent());
106
110
  return _this;
107
111
  }
108
- (0, _createClass2.default)(_LocalMicrophoneStream, [{
112
+ (0, _inherits2.default)(_LocalMicrophoneStream, _WcmeLocalMicrophoneS);
113
+ return (0, _createClass2.default)(_LocalMicrophoneStream, [{
109
114
  key: "setUnmuteAllowed",
110
115
  value:
111
116
  /**
@@ -131,7 +136,7 @@ var _LocalMicrophoneStream = /*#__PURE__*/function (_WcmeLocalMicrophoneS) {
131
136
  throw new Error('Unmute is not allowed');
132
137
  }
133
138
  }
134
- return (0, _get2.default)((0, _getPrototypeOf2.default)(_LocalMicrophoneStream.prototype), "setUserMuted", this).call(this, muted);
139
+ return _superPropGet(_LocalMicrophoneStream, "setUserMuted", this, 3)([muted]);
135
140
  }
136
141
 
137
142
  /**
@@ -146,24 +151,22 @@ var _LocalMicrophoneStream = /*#__PURE__*/function (_WcmeLocalMicrophoneS) {
146
151
  }
147
152
  }
148
153
  }]);
149
- return _LocalMicrophoneStream;
150
154
  }(_internalMediaCore.LocalMicrophoneStream);
151
155
  _LocalCameraStreamEve = LocalCameraStreamEventNames.ServerMuted;
152
156
  var _LocalCameraStream = /*#__PURE__*/function (_WcmeLocalCameraStrea) {
153
- (0, _inherits2.default)(_LocalCameraStream, _WcmeLocalCameraStrea);
154
- var _super2 = _createSuper(_LocalCameraStream);
155
157
  function _LocalCameraStream() {
156
158
  var _this2;
157
159
  (0, _classCallCheck2.default)(this, _LocalCameraStream);
158
160
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
159
161
  args[_key2] = arguments[_key2];
160
162
  }
161
- _this2 = _super2.call.apply(_super2, [this].concat(args));
162
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "unmuteAllowed", true);
163
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), _LocalCameraStreamEve, new _tsEvents.TypedEvent());
163
+ _this2 = _callSuper(this, _LocalCameraStream, [].concat(args));
164
+ (0, _defineProperty2.default)(_this2, "unmuteAllowed", true);
165
+ (0, _defineProperty2.default)(_this2, _LocalCameraStreamEve, new _tsEvents.TypedEvent());
164
166
  return _this2;
165
167
  }
166
- (0, _createClass2.default)(_LocalCameraStream, [{
168
+ (0, _inherits2.default)(_LocalCameraStream, _WcmeLocalCameraStrea);
169
+ return (0, _createClass2.default)(_LocalCameraStream, [{
167
170
  key: "setUnmuteAllowed",
168
171
  value:
169
172
  /**
@@ -189,7 +192,7 @@ var _LocalCameraStream = /*#__PURE__*/function (_WcmeLocalCameraStrea) {
189
192
  throw new Error('Unmute is not allowed');
190
193
  }
191
194
  }
192
- return (0, _get2.default)((0, _getPrototypeOf2.default)(_LocalCameraStream.prototype), "setUserMuted", this).call(this, muted);
195
+ return _superPropGet(_LocalCameraStream, "setUserMuted", this, 3)([muted]);
193
196
  }
194
197
 
195
198
  /**
@@ -204,7 +207,6 @@ var _LocalCameraStream = /*#__PURE__*/function (_WcmeLocalCameraStrea) {
204
207
  }
205
208
  }
206
209
  }]);
207
- return _LocalCameraStream;
208
210
  }(_internalMediaCore.LocalCameraStream);
209
211
  var LocalMicrophoneStream = exports.LocalMicrophoneStream = (0, _tsEvents.AddEvents)(_LocalMicrophoneStream);
210
212
  var LocalCameraStream = exports.LocalCameraStream = (0, _tsEvents.AddEvents)(_LocalCameraStream);
@@ -1 +1 @@
1
- {"version":3,"names":["_internalMediaCore","require","_tsEvents","_LocalMicrophoneStrea","_LocalCameraStreamEve","ownKeys","e","r","t","_Object$keys","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","_Reflect$construct","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","LocalMicrophoneStreamEventNames","exports","LocalCameraStreamEventNames","ServerMuted","_LocalMicrophoneStream","_WcmeLocalMicrophoneS","_inherits2","_super","_this","_classCallCheck2","_len","args","Array","_key","concat","_assertThisInitialized2","TypedEvent","_createClass2","key","value","setUnmuteAllowed","allowed","unmuteAllowed","isUnmuteAllowed","setUserMuted","muted","Error","_get2","setServerMuted","reason","userMuted","emit","WcmeLocalMicrophoneStream","_LocalCameraStream","_WcmeLocalCameraStrea","_super2","_this2","_len2","_key2","WcmeLocalCameraStream","LocalMicrophoneStream","AddEvents","LocalCameraStream","createMicrophoneStream","constraints","wcmeCreateMicrophoneStream","createCameraStream","wcmeCreateCameraStream","createCameraAndMicrophoneStreams","wcmeCreateCameraAndMicrophoneStreams","createDisplayStream","videoContentHint","wcmeCreateDisplayStream","LocalDisplayStream","createDisplayStreamWithAudio","wcmeCreateDisplayStreamWithAudio","LocalSystemAudioStream","createDisplayMedia","options","undefined","video","wcmeCreateDisplayMedia","displayStreamConstructor","audio","systemAudioStreamConstructor"],"sources":["webrtc-core.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-misused-new */\n/* eslint-disable valid-jsdoc */\n/* eslint-disable require-jsdoc */\nimport {\n AudioDeviceConstraints,\n createCameraStream as wcmeCreateCameraStream,\n createCameraAndMicrophoneStreams as wcmeCreateCameraAndMicrophoneStreams,\n createDisplayMedia as wcmeCreateDisplayMedia,\n createDisplayStream as wcmeCreateDisplayStream,\n createDisplayStreamWithAudio as wcmeCreateDisplayStreamWithAudio,\n createMicrophoneStream as wcmeCreateMicrophoneStream,\n LocalDisplayStream,\n LocalSystemAudioStream,\n LocalMicrophoneStream as WcmeLocalMicrophoneStream,\n LocalCameraStream as WcmeLocalCameraStream,\n VideoContentHint,\n VideoDeviceConstraints,\n} from '@webex/internal-media-core';\nimport {AddEvents, TypedEvent, WithEventsDummyType} from '@webex/ts-events';\n\nexport {\n getDevices,\n LocalStream,\n LocalDisplayStream,\n LocalSystemAudioStream,\n LocalStreamEventNames,\n StreamEventNames,\n RemoteStream,\n RemoteStreamEventNames,\n type VideoContentHint,\n type StreamState,\n} from '@webex/internal-media-core';\n\nexport type ServerMuteReason =\n | 'remotelyMuted' // other user has remotely muted us\n | 'clientRequestFailed' // client called setUserMuted() but server request failed\n | 'localUnmuteRequired'; // server forced the client to be unmuted\n\n// these events are in addition to WCME events. This will be properly typed once webrtc-core event types inheritance is fixed\nexport enum LocalMicrophoneStreamEventNames {\n ServerMuted = 'muted:byServer',\n}\n\n// these events are in addition to WCME events. This will be properly typed once webrtc-core event types inheritance is fixed\nexport enum LocalCameraStreamEventNames {\n ServerMuted = 'muted:byServer',\n}\n\ninterface LocalMicrophoneStreamEvents {\n [LocalMicrophoneStreamEventNames.ServerMuted]: TypedEvent<\n (muted: boolean, reason: ServerMuteReason) => void\n >;\n}\n\ninterface LocalCameraStreamEvents {\n [LocalCameraStreamEventNames.ServerMuted]: TypedEvent<\n (muted: boolean, reason: ServerMuteReason) => void\n >;\n}\n\nclass _LocalMicrophoneStream extends WcmeLocalMicrophoneStream {\n private unmuteAllowed = true;\n\n [LocalMicrophoneStreamEventNames.ServerMuted] = new TypedEvent<\n (muted: boolean, reason: ServerMuteReason) => void\n >();\n\n /**\n * @internal\n */\n setUnmuteAllowed(allowed: boolean) {\n this.unmuteAllowed = allowed;\n }\n\n /**\n * @returns true if user is allowed to unmute the track, false otherwise\n */\n isUnmuteAllowed() {\n return this.unmuteAllowed;\n }\n\n setUserMuted(muted: boolean): void {\n if (!muted) {\n if (!this.isUnmuteAllowed()) {\n throw new Error('Unmute is not allowed');\n }\n }\n\n return super.setUserMuted(muted);\n }\n\n /**\n * @internal\n */\n setServerMuted(muted: boolean, reason: ServerMuteReason) {\n if (muted !== this.userMuted) {\n this.setUserMuted(muted);\n this[LocalMicrophoneStreamEventNames.ServerMuted].emit(muted, reason);\n }\n }\n}\n\nclass _LocalCameraStream extends WcmeLocalCameraStream {\n private unmuteAllowed = true;\n\n [LocalCameraStreamEventNames.ServerMuted] = new TypedEvent<\n (muted: boolean, reason: ServerMuteReason) => void\n >();\n\n /**\n * @internal\n */\n setUnmuteAllowed(allowed: boolean) {\n this.unmuteAllowed = allowed;\n }\n\n /**\n * @returns true if user is allowed to unmute the track, false otherwise\n */\n isUnmuteAllowed() {\n return this.unmuteAllowed;\n }\n\n setUserMuted(muted: boolean): void {\n if (!muted) {\n if (!this.isUnmuteAllowed()) {\n throw new Error('Unmute is not allowed');\n }\n }\n\n return super.setUserMuted(muted);\n }\n\n /**\n * @internal\n */\n setServerMuted(muted: boolean, reason: ServerMuteReason) {\n if (muted !== this.userMuted) {\n this.setUserMuted(muted);\n this[LocalCameraStreamEventNames.ServerMuted].emit(muted, reason);\n }\n }\n}\n\nexport const LocalMicrophoneStream = AddEvents<\n typeof _LocalMicrophoneStream,\n LocalMicrophoneStreamEvents\n>(_LocalMicrophoneStream);\n\nexport type LocalMicrophoneStream = _LocalMicrophoneStream &\n WithEventsDummyType<LocalMicrophoneStreamEvents>;\n\nexport const LocalCameraStream = AddEvents<typeof _LocalCameraStream, LocalCameraStreamEvents>(\n _LocalCameraStream\n);\n\nexport type LocalCameraStream = _LocalCameraStream & WithEventsDummyType<LocalCameraStreamEvents>;\n\nexport const createMicrophoneStream = (constraints?: AudioDeviceConstraints) =>\n wcmeCreateMicrophoneStream(LocalMicrophoneStream, constraints);\n\nexport const createCameraStream = (constraints?: VideoDeviceConstraints) =>\n wcmeCreateCameraStream(LocalCameraStream, constraints);\n\nexport const createCameraAndMicrophoneStreams = (constraints?: {\n video?: VideoDeviceConstraints;\n audio?: AudioDeviceConstraints;\n}) => wcmeCreateCameraAndMicrophoneStreams(LocalCameraStream, LocalMicrophoneStream, constraints);\n\nexport const createDisplayStream = (videoContentHint?: VideoContentHint) =>\n wcmeCreateDisplayStream(LocalDisplayStream, videoContentHint);\n\nexport const createDisplayStreamWithAudio = (videoContentHint?: VideoContentHint) =>\n wcmeCreateDisplayStreamWithAudio(LocalDisplayStream, LocalSystemAudioStream, videoContentHint);\n\nexport const createDisplayMedia = (\n options: {\n video: {\n constraints?: VideoDeviceConstraints;\n videoContentHint?: VideoContentHint;\n preferCurrentTab?: boolean;\n selfBrowserSurface?: 'include' | 'exclude';\n surfaceSwitching?: 'include' | 'exclude';\n monitorTypeSurfaces?: 'include' | 'exclude';\n };\n audio?: {\n constraints?: AudioDeviceConstraints;\n systemAudio?: 'include' | 'exclude';\n };\n } = {video: {}}\n) =>\n wcmeCreateDisplayMedia({\n video: {displayStreamConstructor: LocalDisplayStream, ...options?.video},\n audio: options?.audio\n ? {systemAudioStreamConstructor: LocalSystemAudioStream, ...options.audio}\n : undefined,\n });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,kBAAA,GAAAC,OAAA;AAeA,IAAAC,SAAA,GAAAD,OAAA;AAA4E,IAAAE,qBAAA,EAAAC,qBAAA;AAlB5E;AACA;AACA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAH,CAAA,OAAAI,6BAAA,QAAAC,CAAA,GAAAD,6BAAA,CAAAJ,CAAA,GAAAC,CAAA,KAAAI,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAL,CAAA,WAAAM,gCAAA,CAAAP,CAAA,EAAAC,CAAA,EAAAO,UAAA,OAAAN,CAAA,CAAAO,IAAA,CAAAC,KAAA,CAAAR,CAAA,EAAAG,CAAA,YAAAH,CAAA;AAAA,SAAAS,cAAAX,CAAA,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AK,EAAE,CAAC;EAAC,CAAC;EAAA,OAEf,IAAAC,qCAAsB,EAAC;IACrBD,KAAK,EAAAzF,aAAA;MAAG2F,wBAAwB,EAAET;IAAkB,GAAKK,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,KAAK,CAAC;IACxEG,KAAK,EAAEL,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEK,KAAK,GAAA5F,aAAA;MAChB6F,4BAA4B,EAAER;IAAsB,GAAKE,OAAO,CAACK,KAAK,IACvEJ;EACN,CAAC,CAAC;AAAA"}
1
+ {"version":3,"names":["_internalMediaCore","require","_tsEvents","_LocalMicrophoneStrea","_LocalCameraStreamEve","ownKeys","e","r","t","_Object$keys","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","_callSuper","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","Boolean","prototype","valueOf","call","_superPropGet","p","_get2","LocalMicrophoneStreamEventNames","exports","LocalCameraStreamEventNames","ServerMuted","_LocalMicrophoneStream","_WcmeLocalMicrophoneS","_this","_classCallCheck2","_len","args","Array","_key","concat","TypedEvent","_inherits2","_createClass2","key","value","setUnmuteAllowed","allowed","unmuteAllowed","isUnmuteAllowed","setUserMuted","muted","Error","setServerMuted","reason","userMuted","emit","WcmeLocalMicrophoneStream","_LocalCameraStream","_WcmeLocalCameraStrea","_this2","_len2","_key2","WcmeLocalCameraStream","LocalMicrophoneStream","AddEvents","LocalCameraStream","createMicrophoneStream","constraints","wcmeCreateMicrophoneStream","createCameraStream","wcmeCreateCameraStream","createCameraAndMicrophoneStreams","wcmeCreateCameraAndMicrophoneStreams","createDisplayStream","videoContentHint","wcmeCreateDisplayStream","LocalDisplayStream","createDisplayStreamWithAudio","wcmeCreateDisplayStreamWithAudio","LocalSystemAudioStream","createDisplayMedia","options","undefined","video","wcmeCreateDisplayMedia","displayStreamConstructor","audio","systemAudioStreamConstructor"],"sources":["webrtc-core.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-misused-new */\n/* eslint-disable valid-jsdoc */\n/* eslint-disable require-jsdoc */\nimport {\n AudioDeviceConstraints,\n createCameraStream as wcmeCreateCameraStream,\n createCameraAndMicrophoneStreams as wcmeCreateCameraAndMicrophoneStreams,\n createDisplayMedia as wcmeCreateDisplayMedia,\n createDisplayStream as wcmeCreateDisplayStream,\n createDisplayStreamWithAudio as wcmeCreateDisplayStreamWithAudio,\n createMicrophoneStream as wcmeCreateMicrophoneStream,\n LocalDisplayStream,\n LocalSystemAudioStream,\n LocalMicrophoneStream as WcmeLocalMicrophoneStream,\n LocalCameraStream as WcmeLocalCameraStream,\n VideoContentHint,\n VideoDeviceConstraints,\n} from '@webex/internal-media-core';\nimport {AddEvents, TypedEvent, WithEventsDummyType} from '@webex/ts-events';\n\nexport {\n getDevices,\n LocalStream,\n LocalDisplayStream,\n LocalSystemAudioStream,\n LocalStreamEventNames,\n StreamEventNames,\n RemoteStream,\n RemoteStreamEventNames,\n type VideoContentHint,\n type StreamState,\n type InboundAudioIssueEvent,\n InboundAudioIssueSubTypes,\n} from '@webex/internal-media-core';\n\nexport type ServerMuteReason =\n | 'remotelyMuted' // other user has remotely muted us\n | 'clientRequestFailed' // client called setUserMuted() but server request failed\n | 'localUnmuteRequired'; // server forced the client to be unmuted\n\n// these events are in addition to WCME events. This will be properly typed once webrtc-core event types inheritance is fixed\nexport enum LocalMicrophoneStreamEventNames {\n ServerMuted = 'muted:byServer',\n}\n\n// these events are in addition to WCME events. This will be properly typed once webrtc-core event types inheritance is fixed\nexport enum LocalCameraStreamEventNames {\n ServerMuted = 'muted:byServer',\n}\n\ninterface LocalMicrophoneStreamEvents {\n [LocalMicrophoneStreamEventNames.ServerMuted]: TypedEvent<\n (muted: boolean, reason: ServerMuteReason) => void\n >;\n}\n\ninterface LocalCameraStreamEvents {\n [LocalCameraStreamEventNames.ServerMuted]: TypedEvent<\n (muted: boolean, reason: ServerMuteReason) => void\n >;\n}\n\nclass _LocalMicrophoneStream extends WcmeLocalMicrophoneStream {\n private unmuteAllowed = true;\n\n [LocalMicrophoneStreamEventNames.ServerMuted] = new TypedEvent<\n (muted: boolean, reason: ServerMuteReason) => void\n >();\n\n /**\n * @internal\n */\n setUnmuteAllowed(allowed: boolean) {\n this.unmuteAllowed = allowed;\n }\n\n /**\n * @returns true if user is allowed to unmute the track, false otherwise\n */\n isUnmuteAllowed() {\n return this.unmuteAllowed;\n }\n\n setUserMuted(muted: boolean): void {\n if (!muted) {\n if (!this.isUnmuteAllowed()) {\n throw new Error('Unmute is not allowed');\n }\n }\n\n return super.setUserMuted(muted);\n }\n\n /**\n * @internal\n */\n setServerMuted(muted: boolean, reason: ServerMuteReason) {\n if (muted !== this.userMuted) {\n this.setUserMuted(muted);\n this[LocalMicrophoneStreamEventNames.ServerMuted].emit(muted, reason);\n }\n }\n}\n\nclass _LocalCameraStream extends WcmeLocalCameraStream {\n private unmuteAllowed = true;\n\n [LocalCameraStreamEventNames.ServerMuted] = new TypedEvent<\n (muted: boolean, reason: ServerMuteReason) => void\n >();\n\n /**\n * @internal\n */\n setUnmuteAllowed(allowed: boolean) {\n this.unmuteAllowed = allowed;\n }\n\n /**\n * @returns true if user is allowed to unmute the track, false otherwise\n */\n isUnmuteAllowed() {\n return this.unmuteAllowed;\n }\n\n setUserMuted(muted: boolean): void {\n if (!muted) {\n if (!this.isUnmuteAllowed()) {\n throw new Error('Unmute is not allowed');\n }\n }\n\n return super.setUserMuted(muted);\n }\n\n /**\n * @internal\n */\n setServerMuted(muted: boolean, reason: ServerMuteReason) {\n if (muted !== this.userMuted) {\n this.setUserMuted(muted);\n this[LocalCameraStreamEventNames.ServerMuted].emit(muted, reason);\n }\n }\n}\n\nexport const LocalMicrophoneStream = AddEvents<\n typeof _LocalMicrophoneStream,\n LocalMicrophoneStreamEvents\n>(_LocalMicrophoneStream);\n\nexport type LocalMicrophoneStream = _LocalMicrophoneStream &\n WithEventsDummyType<LocalMicrophoneStreamEvents>;\n\nexport const LocalCameraStream = AddEvents<typeof _LocalCameraStream, LocalCameraStreamEvents>(\n _LocalCameraStream\n);\n\nexport type LocalCameraStream = _LocalCameraStream & WithEventsDummyType<LocalCameraStreamEvents>;\n\nexport const createMicrophoneStream = (constraints?: AudioDeviceConstraints) =>\n wcmeCreateMicrophoneStream(LocalMicrophoneStream, constraints);\n\nexport const createCameraStream = (constraints?: VideoDeviceConstraints) =>\n wcmeCreateCameraStream(LocalCameraStream, constraints);\n\nexport const createCameraAndMicrophoneStreams = (constraints?: {\n video?: VideoDeviceConstraints;\n audio?: AudioDeviceConstraints;\n}) => wcmeCreateCameraAndMicrophoneStreams(LocalCameraStream, LocalMicrophoneStream, constraints);\n\nexport const createDisplayStream = (videoContentHint?: VideoContentHint) =>\n wcmeCreateDisplayStream(LocalDisplayStream, videoContentHint);\n\nexport const createDisplayStreamWithAudio = (videoContentHint?: VideoContentHint) =>\n wcmeCreateDisplayStreamWithAudio(LocalDisplayStream, LocalSystemAudioStream, videoContentHint);\n\nexport const createDisplayMedia = (\n options: {\n video: {\n constraints?: VideoDeviceConstraints;\n videoContentHint?: VideoContentHint;\n preferCurrentTab?: boolean;\n selfBrowserSurface?: 'include' | 'exclude';\n surfaceSwitching?: 'include' | 'exclude';\n monitorTypeSurfaces?: 'include' | 'exclude';\n };\n audio?: {\n constraints?: AudioDeviceConstraints;\n systemAudio?: 'include' | 'exclude';\n };\n } = {video: {}}\n) =>\n wcmeCreateDisplayMedia({\n video: {displayStreamConstructor: LocalDisplayStream, ...options?.video},\n audio: options?.audio\n ? {systemAudioStreamConstructor: LocalSystemAudioStream, ...options.audio}\n : undefined,\n });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,kBAAA,G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D,4BAAA,GAAG,SAA/BA,4BAA4BA,CAAIH,gBAAmC;EAAA,OAC9E,IAAAI,+CAAgC,EAACF,qCAAkB,EAAEG,yCAAsB,EAAEL,gBAAgB,CAAC;AAAA;AAEzF,IAAMM,kBAAkB,GAAApD,OAAA,CAAAoD,kBAAA,GAAG,SAArBA,kBAAkBA,CAAA;EAAA,IAC7BC,OAaC,GAAA5E,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAA6E,SAAA,GAAA7E,SAAA,MAAG;IAAC8E,KAAK,EAAE,CAAC;EAAC,CAAC;EAAA,OAEf,IAAAC,qCAAsB,EAAC;IACrBD,KAAK,EAAA/E,aAAA;MAAGiF,wBAAwB,EAAET;IAAkB,GAAKK,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,KAAK,CAAC;IACxEG,KAAK,EAAEL,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEK,KAAK,GAAAlF,aAAA;MAChBmF,4BAA4B,EAAER;IAAsB,GAAKE,OAAO,CAACK,KAAK,IACvEJ;EACN,CAAC,CAAC;AAAA","ignoreList":[]}
package/package.json CHANGED
@@ -22,9 +22,9 @@
22
22
  "deploy:npm": "yarn npm publish"
23
23
  },
24
24
  "dependencies": {
25
- "@webex/internal-media-core": "2.19.0",
25
+ "@webex/internal-media-core": "2.20.3",
26
26
  "@webex/ts-events": "^1.1.0",
27
- "@webex/web-media-effects": "2.27.1"
27
+ "@webex/web-media-effects": "2.32.1"
28
28
  },
29
29
  "browserify": {
30
30
  "transform": [
@@ -39,12 +39,12 @@
39
39
  "@webex/eslint-config-legacy": "0.0.0",
40
40
  "@webex/jest-config-legacy": "0.0.0",
41
41
  "@webex/legacy-tools": "0.0.0",
42
- "@webex/test-helper-chai": "3.10.0-wxc-disconnect.1",
43
- "@webex/test-helper-mock-webex": "3.10.0-wxc-disconnect.1",
42
+ "@webex/test-helper-chai": "3.11.0",
43
+ "@webex/test-helper-mock-webex": "3.11.0",
44
44
  "eslint": "^8.24.0",
45
45
  "jsdom-global": "3.0.2",
46
46
  "prettier": "^2.7.1",
47
47
  "sinon": "^9.2.4"
48
48
  },
49
- "version": "3.10.0-wxc-disconnect.1"
49
+ "version": "3.11.0"
50
50
  }
@@ -29,6 +29,8 @@ export {
29
29
  RemoteStreamEventNames,
30
30
  type VideoContentHint,
31
31
  type StreamState,
32
+ type InboundAudioIssueEvent,
33
+ InboundAudioIssueSubTypes,
32
34
  } from '@webex/internal-media-core';
33
35
 
34
36
  export type ServerMuteReason =