@webex/media-helpers
Advanced tools
Comparing version 3.0.1-next.8 to 3.0.1-next.9
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property"); | ||
_Object$defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.PresetCameraConstraints = exports.FacingMode = exports.DisplaySurface = void 0; | ||
let FacingMode = exports.FacingMode = /*#__PURE__*/function (FacingMode) { | ||
var FacingMode = exports.FacingMode = /*#__PURE__*/function (FacingMode) { | ||
FacingMode["user"] = "user"; | ||
@@ -12,3 +13,3 @@ FacingMode["environment"] = "environment"; | ||
}({}); // can be used later on when we add constraints in create display track | ||
let DisplaySurface = exports.DisplaySurface = /*#__PURE__*/function (DisplaySurface) { | ||
var DisplaySurface = exports.DisplaySurface = /*#__PURE__*/function (DisplaySurface) { | ||
DisplaySurface["browser"] = "browser"; | ||
@@ -19,3 +20,3 @@ DisplaySurface["monitor"] = "monitor"; | ||
}({}); | ||
const PresetCameraConstraints = exports.PresetCameraConstraints = { | ||
var PresetCameraConstraints = exports.PresetCameraConstraints = { | ||
'1080p': { | ||
@@ -22,0 +23,0 @@ frameRate: 30, |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property"); | ||
_Object$defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, "DisplaySurface", { | ||
_Object$defineProperty(exports, "DisplaySurface", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _constants.DisplaySurface; | ||
} | ||
}); | ||
Object.defineProperty(exports, "FacingMode", { | ||
_Object$defineProperty(exports, "FacingMode", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _constants.FacingMode; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LocalCameraStream", { | ||
_Object$defineProperty(exports, "LocalCameraStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.LocalCameraStream; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LocalCameraStreamEventNames", { | ||
_Object$defineProperty(exports, "LocalCameraStreamEventNames", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.LocalCameraStreamEventNames; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LocalDisplayStream", { | ||
_Object$defineProperty(exports, "LocalDisplayStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.LocalDisplayStream; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LocalMicrophoneStream", { | ||
_Object$defineProperty(exports, "LocalMicrophoneStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.LocalMicrophoneStream; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LocalMicrophoneStreamEventNames", { | ||
_Object$defineProperty(exports, "LocalMicrophoneStreamEventNames", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.LocalMicrophoneStreamEventNames; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LocalStream", { | ||
_Object$defineProperty(exports, "LocalStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.LocalStream; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LocalStreamEventNames", { | ||
_Object$defineProperty(exports, "LocalStreamEventNames", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.LocalStreamEventNames; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LocalSystemAudioStream", { | ||
_Object$defineProperty(exports, "LocalSystemAudioStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.LocalSystemAudioStream; | ||
} | ||
}); | ||
Object.defineProperty(exports, "NoiseReductionEffect", { | ||
_Object$defineProperty(exports, "NoiseReductionEffect", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webMediaEffects.NoiseReductionEffect; | ||
} | ||
}); | ||
Object.defineProperty(exports, "PresetCameraConstraints", { | ||
_Object$defineProperty(exports, "PresetCameraConstraints", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _constants.PresetCameraConstraints; | ||
} | ||
}); | ||
Object.defineProperty(exports, "RemoteStream", { | ||
_Object$defineProperty(exports, "RemoteStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.RemoteStream; | ||
} | ||
}); | ||
Object.defineProperty(exports, "RemoteStreamEventNames", { | ||
_Object$defineProperty(exports, "RemoteStreamEventNames", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.RemoteStreamEventNames; | ||
} | ||
}); | ||
Object.defineProperty(exports, "StreamEventNames", { | ||
_Object$defineProperty(exports, "StreamEventNames", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.StreamEventNames; | ||
} | ||
}); | ||
Object.defineProperty(exports, "VirtualBackgroundEffect", { | ||
_Object$defineProperty(exports, "VirtualBackgroundEffect", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webMediaEffects.VirtualBackgroundEffect; | ||
} | ||
}); | ||
Object.defineProperty(exports, "createCameraStream", { | ||
_Object$defineProperty(exports, "createCameraStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.createCameraStream; | ||
} | ||
}); | ||
Object.defineProperty(exports, "createDisplayStream", { | ||
_Object$defineProperty(exports, "createDisplayStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.createDisplayStream; | ||
} | ||
}); | ||
Object.defineProperty(exports, "createDisplayStreamWithAudio", { | ||
_Object$defineProperty(exports, "createDisplayStreamWithAudio", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.createDisplayStreamWithAudio; | ||
} | ||
}); | ||
Object.defineProperty(exports, "createMicrophoneStream", { | ||
_Object$defineProperty(exports, "createMicrophoneStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.createMicrophoneStream; | ||
} | ||
}); | ||
Object.defineProperty(exports, "getDevices", { | ||
_Object$defineProperty(exports, "getDevices", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _webrtcCore.getDevices; | ||
@@ -130,0 +131,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct"); | ||
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property"); | ||
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault"); | ||
_Object$defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.LocalCameraStreamEventNames = exports.LocalCameraStream = void 0; | ||
Object.defineProperty(exports, "LocalDisplayStream", { | ||
_Object$defineProperty(exports, "LocalDisplayStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _internalMediaCore.LocalDisplayStream; | ||
@@ -14,35 +17,35 @@ } | ||
exports.LocalMicrophoneStreamEventNames = exports.LocalMicrophoneStream = void 0; | ||
Object.defineProperty(exports, "LocalStream", { | ||
_Object$defineProperty(exports, "LocalStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _internalMediaCore.LocalStream; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LocalStreamEventNames", { | ||
_Object$defineProperty(exports, "LocalStreamEventNames", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _internalMediaCore.LocalStreamEventNames; | ||
} | ||
}); | ||
Object.defineProperty(exports, "LocalSystemAudioStream", { | ||
_Object$defineProperty(exports, "LocalSystemAudioStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _internalMediaCore.LocalSystemAudioStream; | ||
} | ||
}); | ||
Object.defineProperty(exports, "RemoteStream", { | ||
_Object$defineProperty(exports, "RemoteStream", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _internalMediaCore.RemoteStream; | ||
} | ||
}); | ||
Object.defineProperty(exports, "RemoteStreamEventNames", { | ||
_Object$defineProperty(exports, "RemoteStreamEventNames", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _internalMediaCore.RemoteStreamEventNames; | ||
} | ||
}); | ||
Object.defineProperty(exports, "StreamEventNames", { | ||
_Object$defineProperty(exports, "StreamEventNames", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _internalMediaCore.StreamEventNames; | ||
@@ -52,105 +55,164 @@ } | ||
exports.createMicrophoneStream = exports.createDisplayStreamWithAudio = exports.createDisplayStream = exports.createCameraStream = void 0; | ||
Object.defineProperty(exports, "getDevices", { | ||
_Object$defineProperty(exports, "getDevices", { | ||
enumerable: true, | ||
get: function () { | ||
get: function get() { | ||
return _internalMediaCore.getDevices; | ||
} | ||
}); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck")); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass")); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized")); | ||
var _get2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/get")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty")); | ||
var _internalMediaCore = require("@webex/internal-media-core"); | ||
var _tsEvents = require("@webex/ts-events"); | ||
var _LocalMicrophoneStrea, _LocalCameraStreamEve; | ||
/* eslint-disable @typescript-eslint/no-misused-new */ | ||
/* eslint-disable valid-jsdoc */ | ||
/* eslint-disable require-jsdoc */ | ||
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); }; } | ||
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; } } | ||
// server forced the client to be unmuted | ||
// these events are in addition to WCME events. This will be properly typed once webrtc-core event types inheritance is fixed | ||
let LocalMicrophoneStreamEventNames = exports.LocalMicrophoneStreamEventNames = /*#__PURE__*/function (LocalMicrophoneStreamEventNames) { | ||
var LocalMicrophoneStreamEventNames = exports.LocalMicrophoneStreamEventNames = /*#__PURE__*/function (LocalMicrophoneStreamEventNames) { | ||
LocalMicrophoneStreamEventNames["ServerMuted"] = "muted:byServer"; | ||
return LocalMicrophoneStreamEventNames; | ||
}({}); // these events are in addition to WCME events. This will be properly typed once webrtc-core event types inheritance is fixed | ||
let LocalCameraStreamEventNames = exports.LocalCameraStreamEventNames = /*#__PURE__*/function (LocalCameraStreamEventNames) { | ||
var LocalCameraStreamEventNames = exports.LocalCameraStreamEventNames = /*#__PURE__*/function (LocalCameraStreamEventNames) { | ||
LocalCameraStreamEventNames["ServerMuted"] = "muted:byServer"; | ||
return LocalCameraStreamEventNames; | ||
}({}); | ||
class _LocalMicrophoneStream extends _internalMediaCore.LocalMicrophoneStream { | ||
unmuteAllowed = true; | ||
[LocalMicrophoneStreamEventNames.ServerMuted] = new _tsEvents.TypedEvent(); | ||
/** | ||
* @internal | ||
*/ | ||
setUnmuteAllowed(allowed) { | ||
this.unmuteAllowed = allowed; | ||
_LocalMicrophoneStrea = LocalMicrophoneStreamEventNames.ServerMuted; | ||
var _LocalMicrophoneStream = /*#__PURE__*/function (_WcmeLocalMicrophoneS) { | ||
(0, _inherits2.default)(_LocalMicrophoneStream, _WcmeLocalMicrophoneS); | ||
var _super = _createSuper(_LocalMicrophoneStream); | ||
function _LocalMicrophoneStream() { | ||
var _this; | ||
(0, _classCallCheck2.default)(this, _LocalMicrophoneStream); | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "unmuteAllowed", true); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), _LocalMicrophoneStrea, new _tsEvents.TypedEvent()); | ||
return _this; | ||
} | ||
(0, _createClass2.default)(_LocalMicrophoneStream, [{ | ||
key: "setUnmuteAllowed", | ||
value: | ||
/** | ||
* @internal | ||
*/ | ||
function setUnmuteAllowed(allowed) { | ||
this.unmuteAllowed = allowed; | ||
} | ||
/** | ||
* @returns true if user is allowed to unmute the track, false otherwise | ||
*/ | ||
isUnmuteAllowed() { | ||
return this.unmuteAllowed; | ||
} | ||
setUserMuted(muted) { | ||
if (!muted) { | ||
if (!this.isUnmuteAllowed()) { | ||
throw new Error('Unmute is not allowed'); | ||
/** | ||
* @returns true if user is allowed to unmute the track, false otherwise | ||
*/ | ||
}, { | ||
key: "isUnmuteAllowed", | ||
value: function isUnmuteAllowed() { | ||
return this.unmuteAllowed; | ||
} | ||
}, { | ||
key: "setUserMuted", | ||
value: function setUserMuted(muted) { | ||
if (!muted) { | ||
if (!this.isUnmuteAllowed()) { | ||
throw new Error('Unmute is not allowed'); | ||
} | ||
} | ||
return (0, _get2.default)((0, _getPrototypeOf2.default)(_LocalMicrophoneStream.prototype), "setUserMuted", this).call(this, muted); | ||
} | ||
return super.setUserMuted(muted); | ||
} | ||
/** | ||
* @internal | ||
*/ | ||
setServerMuted(muted, reason) { | ||
if (muted !== this.userMuted) { | ||
this.setUserMuted(muted); | ||
this[LocalMicrophoneStreamEventNames.ServerMuted].emit(muted, reason); | ||
/** | ||
* @internal | ||
*/ | ||
}, { | ||
key: "setServerMuted", | ||
value: function setServerMuted(muted, reason) { | ||
if (muted !== this.userMuted) { | ||
this.setUserMuted(muted); | ||
this[LocalMicrophoneStreamEventNames.ServerMuted].emit(muted, reason); | ||
} | ||
} | ||
}]); | ||
return _LocalMicrophoneStream; | ||
}(_internalMediaCore.LocalMicrophoneStream); | ||
_LocalCameraStreamEve = LocalCameraStreamEventNames.ServerMuted; | ||
var _LocalCameraStream = /*#__PURE__*/function (_WcmeLocalCameraStrea) { | ||
(0, _inherits2.default)(_LocalCameraStream, _WcmeLocalCameraStrea); | ||
var _super2 = _createSuper(_LocalCameraStream); | ||
function _LocalCameraStream() { | ||
var _this2; | ||
(0, _classCallCheck2.default)(this, _LocalCameraStream); | ||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
args[_key2] = arguments[_key2]; | ||
} | ||
_this2 = _super2.call.apply(_super2, [this].concat(args)); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), "unmuteAllowed", true); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this2), _LocalCameraStreamEve, new _tsEvents.TypedEvent()); | ||
return _this2; | ||
} | ||
} | ||
class _LocalCameraStream extends _internalMediaCore.LocalCameraStream { | ||
unmuteAllowed = true; | ||
[LocalCameraStreamEventNames.ServerMuted] = new _tsEvents.TypedEvent(); | ||
(0, _createClass2.default)(_LocalCameraStream, [{ | ||
key: "setUnmuteAllowed", | ||
value: | ||
/** | ||
* @internal | ||
*/ | ||
function setUnmuteAllowed(allowed) { | ||
this.unmuteAllowed = allowed; | ||
} | ||
/** | ||
* @internal | ||
*/ | ||
setUnmuteAllowed(allowed) { | ||
this.unmuteAllowed = allowed; | ||
} | ||
/** | ||
* @returns true if user is allowed to unmute the track, false otherwise | ||
*/ | ||
isUnmuteAllowed() { | ||
return this.unmuteAllowed; | ||
} | ||
setUserMuted(muted) { | ||
if (!muted) { | ||
if (!this.isUnmuteAllowed()) { | ||
throw new Error('Unmute is not allowed'); | ||
/** | ||
* @returns true if user is allowed to unmute the track, false otherwise | ||
*/ | ||
}, { | ||
key: "isUnmuteAllowed", | ||
value: function isUnmuteAllowed() { | ||
return this.unmuteAllowed; | ||
} | ||
}, { | ||
key: "setUserMuted", | ||
value: function setUserMuted(muted) { | ||
if (!muted) { | ||
if (!this.isUnmuteAllowed()) { | ||
throw new Error('Unmute is not allowed'); | ||
} | ||
} | ||
return (0, _get2.default)((0, _getPrototypeOf2.default)(_LocalCameraStream.prototype), "setUserMuted", this).call(this, muted); | ||
} | ||
return super.setUserMuted(muted); | ||
} | ||
/** | ||
* @internal | ||
*/ | ||
setServerMuted(muted, reason) { | ||
if (muted !== this.userMuted) { | ||
this.setUserMuted(muted); | ||
this[LocalCameraStreamEventNames.ServerMuted].emit(muted, reason); | ||
/** | ||
* @internal | ||
*/ | ||
}, { | ||
key: "setServerMuted", | ||
value: function setServerMuted(muted, reason) { | ||
if (muted !== this.userMuted) { | ||
this.setUserMuted(muted); | ||
this[LocalCameraStreamEventNames.ServerMuted].emit(muted, reason); | ||
} | ||
} | ||
} | ||
} | ||
const createMicrophoneStream = constraints => (0, _internalMediaCore.createMicrophoneStream)(LocalMicrophoneStream, constraints); | ||
exports.createMicrophoneStream = createMicrophoneStream; | ||
const createCameraStream = constraints => (0, _internalMediaCore.createCameraStream)(LocalCameraStream, constraints); | ||
exports.createCameraStream = createCameraStream; | ||
const createDisplayStream = () => (0, _internalMediaCore.createDisplayStream)(_internalMediaCore.LocalDisplayStream); | ||
exports.createDisplayStream = createDisplayStream; | ||
const createDisplayStreamWithAudio = () => (0, _internalMediaCore.createDisplayStreamWithAudio)(_internalMediaCore.LocalDisplayStream, _internalMediaCore.LocalSystemAudioStream); | ||
exports.createDisplayStreamWithAudio = createDisplayStreamWithAudio; | ||
const LocalMicrophoneStream = exports.LocalMicrophoneStream = (0, _tsEvents.AddEvents)(_LocalMicrophoneStream); | ||
const LocalCameraStream = exports.LocalCameraStream = (0, _tsEvents.AddEvents)(_LocalCameraStream); | ||
}]); | ||
return _LocalCameraStream; | ||
}(_internalMediaCore.LocalCameraStream); | ||
var createMicrophoneStream = exports.createMicrophoneStream = function createMicrophoneStream(constraints) { | ||
return (0, _internalMediaCore.createMicrophoneStream)(LocalMicrophoneStream, constraints); | ||
}; | ||
var createCameraStream = exports.createCameraStream = function createCameraStream(constraints) { | ||
return (0, _internalMediaCore.createCameraStream)(LocalCameraStream, constraints); | ||
}; | ||
var createDisplayStream = exports.createDisplayStream = function createDisplayStream() { | ||
return (0, _internalMediaCore.createDisplayStream)(_internalMediaCore.LocalDisplayStream); | ||
}; | ||
var createDisplayStreamWithAudio = exports.createDisplayStreamWithAudio = function createDisplayStreamWithAudio() { | ||
return (0, _internalMediaCore.createDisplayStreamWithAudio)(_internalMediaCore.LocalDisplayStream, _internalMediaCore.LocalSystemAudioStream); | ||
}; | ||
var LocalMicrophoneStream = exports.LocalMicrophoneStream = (0, _tsEvents.AddEvents)(_LocalMicrophoneStream); | ||
var LocalCameraStream = exports.LocalCameraStream = (0, _tsEvents.AddEvents)(_LocalCameraStream); | ||
//# sourceMappingURL=webrtc-core.js.map |
@@ -47,3 +47,3 @@ { | ||
}, | ||
"version": "3.0.1-next.8" | ||
"version": "3.0.1-next.9" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52306
806