@maxverse/media-web-sdk
Version:
30 lines (27 loc) • 1.32 kB
JavaScript
import { createClass as _createClass, classCallCheck as _classCallCheck, classPrivateFieldLooseBase as _classPrivateFieldLooseBase, toConsumableArray as _toConsumableArray, classPrivateFieldLooseKey as _classPrivateFieldLooseKey } from '../_virtual/_rollupPluginBabelHelpers.mjs';
var _room = /*#__PURE__*/_classPrivateFieldLooseKey("room");
var _allParticipant = /*#__PURE__*/_classPrivateFieldLooseKey("allParticipant");
var Presenter = /*#__PURE__*/_createClass(function Presenter(room) {
var _this = this;
_classCallCheck(this, Presenter);
Object.defineProperty(this, _allParticipant, {
get: _get_allParticipant,
set: void 0
});
Object.defineProperty(this, _room, {
writable: true,
value: void 0
});
this.find = function (userId) {
var presenter = _classPrivateFieldLooseBase(_this, _allParticipant)[_allParticipant].find(function (participant) {
return participant.identity === userId;
});
return presenter;
};
_classPrivateFieldLooseBase(this, _room)[_room] = room;
});
function _get_allParticipant() {
return [_classPrivateFieldLooseBase(this, _room)[_room].localParticipant].concat(_toConsumableArray(Array.from(_classPrivateFieldLooseBase(this, _room)[_room].participants.values())));
}
var Presenter$1 = Presenter;
export { Presenter$1 as default };