Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bambustech/videorooms-ng

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bambustech/videorooms-ng - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

bambustech-videorooms-ng.metadata.json

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":4,"metadata":{"VideoroomsService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":3,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"joinRoom":[{"__symbolic":"method"}],"setNickname":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"VideoroomsComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"bambus-videorooms","template":"","styles":[]}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"VideoroomsService"}]}],"ngOnInit":[{"__symbolic":"method"}]}},"VideoroomsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"VideoroomsComponent"}],"imports":[],"exports":[{"__symbolic":"reference","name":"VideoroomsComponent"}]}]}],"members":{}}},"origins":{"VideoroomsService":"./lib/videorooms.service","VideoroomsComponent":"./lib/videorooms.component","VideoroomsModule":"./lib/videorooms.module"},"importAs":"@bambustech/videorooms-ng"}
{"__symbolic":"module","version":4,"metadata":{"VideoroomsService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":3,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"joinRoom":[{"__symbolic":"method"}],"leaveRoom":[{"__symbolic":"method"}],"setNickname":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"VideoroomsComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"bambus-videorooms","template":"","styles":[]}]}],"members":{"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"onRoomLeft":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":13,"character":3}}]}],"onRoomJoined":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":14,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"VideoroomsService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"VideoroomsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"VideoroomsComponent"}],"imports":[],"exports":[{"__symbolic":"reference","name":"VideoroomsComponent"}]}]}],"members":{}}},"origins":{"VideoroomsService":"./lib/videorooms.service","VideoroomsComponent":"./lib/videorooms.component","VideoroomsModule":"./lib/videorooms.module"},"importAs":"@bambustech/videorooms-ng"}

@@ -8,14 +8,14 @@ (function (global, factory) {

/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

@@ -113,4 +113,9 @@ /* global Reflect, Promise */

function __createBinding(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}
function __exportStar(m, exports) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
}

@@ -226,3 +231,9 @@

this.joinRoomEvent = new core.EventEmitter();
this.leaveRoomEvent = new core.EventEmitter();
}
/**
* Joins a room
* @param roomToken {string} Room's or participant's token
* @param nickname {string} Participant's name to be displayed at room
*/
VideoroomsService.prototype.joinRoom = function () {

@@ -235,2 +246,17 @@ var args = [];

};
/**
* Leaves the room
*
*/
VideoroomsService.prototype.leaveRoom = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
this.leaveRoomEvent.emit(args);
};
/**
* Changes the participant's nickname
* @param nick {string} New nickname to be displayed at room
*/
VideoroomsService.prototype.setNickname = function (nick) {

@@ -251,10 +277,31 @@ VideoSDK.setNickname(nick);

this.videoRoomService = videoRoomService;
videoRoomService.joinRoomEvent.subscribe(function (data) {
this.onRoomLeft = new core.EventEmitter();
this.onRoomJoined = new core.EventEmitter();
this.joinRoomObservable = videoRoomService.joinRoomEvent.subscribe(function (data) {
VideoSDK.joinRoom.apply(VideoSDK, __spread(data));
});
VideoSDK.events.on("roomLeft", videoRoomService.onHangup);
this.leaveRoomObservable = videoRoomService.leaveRoomEvent.subscribe(function (data) {
VideoSDK.hangUp();
});
}
VideoroomsComponent.prototype.ngOnInit = function () {
var _this = this;
VideoSDK.init("bambus-videorooms", this.options);
VideoSDK.events.on("roomLeft", function () {
_this.onRoomLeft.emit();
});
VideoSDK.events.on("roomJoined", function () {
_this.onRoomJoined.emit();
});
};
VideoroomsComponent.prototype.ngOnDestroy = function () {
if (!this.joinRoomObservable.closed) {
this.joinRoomObservable.unsubscribe();
}
if (!this.leaveRoomObservable.closed) {
this.leaveRoomObservable.unsubscribe();
}
VideoSDK.hangUp();
VideoSDK.destroy();
};
VideoroomsComponent.ctorParameters = function () { return [

@@ -266,2 +313,8 @@ { type: VideoroomsService }

], VideoroomsComponent.prototype, "options", void 0);
__decorate([
core.Output()
], VideoroomsComponent.prototype, "onRoomLeft", void 0);
__decorate([
core.Output()
], VideoroomsComponent.prototype, "onRoomJoined", void 0);
VideoroomsComponent = __decorate([

@@ -268,0 +321,0 @@ core.Component({

@@ -1,16 +0,16 @@

!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@bambustech/videorooms-ng",["exports","@angular/core"],o):o(((e=e||self).bambustech=e.bambustech||{},e.bambustech["videorooms-ng"]={}),e.ng.core)}(this,(function(e,o){"use strict";
!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@bambustech/videorooms-ng",["exports","@angular/core"],e):e(((o=o||self).bambustech=o.bambustech||{},o.bambustech["videorooms-ng"]={}),o.ng.core)}(this,(function(o,e){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */function t(e,o,t,n){var r,i=arguments.length,c=i<3?o:null===n?n=Object.getOwnPropertyDescriptor(o,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,o,t,n);else for(var u=e.length-1;u>=0;u--)(r=e[u])&&(c=(i<3?r(c):i>3?r(o,t,c):r(o,t))||c);return i>3&&c&&Object.defineProperty(o,t,c),c}function n(e,o){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,r,i=t.call(e),c=[];try{for(;(void 0===o||o-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(r)throw r.error}}return c}var r=function(){function e(){this.joinRoomEvent=new o.EventEmitter}return e.prototype.joinRoom=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];this.joinRoomEvent.emit(e)},e.prototype.setNickname=function(e){VideoSDK.setNickname(e)},e.ɵprov=o.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=t([o.Injectable({providedIn:"root"})],e)}(),i=function(){function e(e){this.videoRoomService=e,e.joinRoomEvent.subscribe((function(e){VideoSDK.joinRoom.apply(VideoSDK,function(){for(var e=[],o=0;o<arguments.length;o++)e=e.concat(n(arguments[o]));return e}(e))})),VideoSDK.events.on("roomLeft",e.onHangup)}return e.prototype.ngOnInit=function(){VideoSDK.init("bambus-videorooms",this.options)},e.ctorParameters=function(){return[{type:r}]},t([o.Input()],e.prototype,"options",void 0),e=t([o.Component({selector:"bambus-videorooms",template:""})],e)}(),c=function(){function e(){}return e=t([o.NgModule({declarations:[i],imports:[],exports:[i]})],e)}();e.VideoroomsComponent=i,e.VideoroomsModule=c,e.VideoroomsService=r,Object.defineProperty(e,"__esModule",{value:!0})}));
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function t(o,e,t,n){var i,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,t):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(o,e,t,n);else for(var c=o.length-1;c>=0;c--)(i=o[c])&&(s=(r<3?i(s):r>3?i(e,t,s):i(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s}function n(o,e){var t="function"==typeof Symbol&&o[Symbol.iterator];if(!t)return o;var n,i,r=t.call(o),s=[];try{for(;(void 0===e||e-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(o){i={error:o}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(i)throw i.error}}return s}var i=function(){function o(){this.joinRoomEvent=new e.EventEmitter,this.leaveRoomEvent=new e.EventEmitter}return o.prototype.joinRoom=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];this.joinRoomEvent.emit(o)},o.prototype.leaveRoom=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];this.leaveRoomEvent.emit(o)},o.prototype.setNickname=function(o){VideoSDK.setNickname(o)},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o},token:o,providedIn:"root"}),o=t([e.Injectable({providedIn:"root"})],o)}(),r=function(){function o(o){this.videoRoomService=o,this.onRoomLeft=new e.EventEmitter,this.onRoomJoined=new e.EventEmitter,this.joinRoomObservable=o.joinRoomEvent.subscribe((function(o){VideoSDK.joinRoom.apply(VideoSDK,function(){for(var o=[],e=0;e<arguments.length;e++)o=o.concat(n(arguments[e]));return o}(o))})),this.leaveRoomObservable=o.leaveRoomEvent.subscribe((function(o){VideoSDK.hangUp()}))}return o.prototype.ngOnInit=function(){var o=this;VideoSDK.init("bambus-videorooms",this.options),VideoSDK.events.on("roomLeft",(function(){o.onRoomLeft.emit()})),VideoSDK.events.on("roomJoined",(function(){o.onRoomJoined.emit()}))},o.prototype.ngOnDestroy=function(){this.joinRoomObservable.closed||this.joinRoomObservable.unsubscribe(),this.leaveRoomObservable.closed||this.leaveRoomObservable.unsubscribe(),VideoSDK.hangUp(),VideoSDK.destroy()},o.ctorParameters=function(){return[{type:i}]},t([e.Input()],o.prototype,"options",void 0),t([e.Output()],o.prototype,"onRoomLeft",void 0),t([e.Output()],o.prototype,"onRoomJoined",void 0),o=t([e.Component({selector:"bambus-videorooms",template:""})],o)}(),s=function(){function o(){}return o=t([e.NgModule({declarations:[r],imports:[],exports:[r]})],o)}();o.VideoroomsComponent=r,o.VideoroomsModule=s,o.VideoroomsService=i,Object.defineProperty(o,"__esModule",{value:!0})}));
//# sourceMappingURL=bambustech-videorooms-ng.umd.min.js.map
import { __decorate } from "tslib";
import { Component, Input } from "@angular/core";
import { Component, Input, Output, EventEmitter } from "@angular/core";
import { VideoroomsService } from './videorooms.service';

@@ -7,10 +7,30 @@ let VideoroomsComponent = class VideoroomsComponent {

this.videoRoomService = videoRoomService;
videoRoomService.joinRoomEvent.subscribe(data => {
this.onRoomLeft = new EventEmitter();
this.onRoomJoined = new EventEmitter();
this.joinRoomObservable = videoRoomService.joinRoomEvent.subscribe(data => {
VideoSDK.joinRoom(...data);
});
VideoSDK.events.on("roomLeft", videoRoomService.onHangup);
this.leaveRoomObservable = videoRoomService.leaveRoomEvent.subscribe(data => {
VideoSDK.hangUp();
});
}
ngOnInit() {
VideoSDK.init("bambus-videorooms", this.options);
VideoSDK.events.on("roomLeft", () => {
this.onRoomLeft.emit();
});
VideoSDK.events.on("roomJoined", () => {
this.onRoomJoined.emit();
});
}
ngOnDestroy() {
if (!this.joinRoomObservable.closed) {
this.joinRoomObservable.unsubscribe();
}
if (!this.leaveRoomObservable.closed) {
this.leaveRoomObservable.unsubscribe();
}
VideoSDK.hangUp();
VideoSDK.destroy();
}
};

@@ -23,2 +43,8 @@ VideoroomsComponent.ctorParameters = () => [

], VideoroomsComponent.prototype, "options", void 0);
__decorate([
Output()
], VideoroomsComponent.prototype, "onRoomLeft", void 0);
__decorate([
Output()
], VideoroomsComponent.prototype, "onRoomJoined", void 0);
VideoroomsComponent = __decorate([

@@ -31,2 +57,2 @@ Component({

export { VideoroomsComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlkZW9yb29tcy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYmFtYnVzdGVjaC92aWRlb3Jvb21zLW5nLyIsInNvdXJjZXMiOlsibGliL3ZpZGVvcm9vbXMuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLEtBQUssRUFBRSxNQUF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GlzLmpvaW5Sb29tT2JzZXJ2YWJsZS5jbG9zZWQpe1xuICAgICAgdGhpcy5qb2luUm9vbU9ic2VydmFibGUudW5zdWJzY3JpYmUoKTtcbiAgICB9XG4gICAgaWYgKCF0aGlzLmxlYXZlUm9vbU9ic2VydmFibGUuY2xvc2VkKXtcbiAgICAgIHRoaXMubGVhdmVSb29tT2JzZXJ2YWJsZS51bnN1YnNjcmliZSgpO1xuICAgIH1cbiAgICBWaWRlb1NESy5oYW5nVXAoKTtcbiAgICBWaWRlb1NESy5kZXN0cm95KCk7XG4gIH1cbn0iXX0=

@@ -7,6 +7,23 @@ import { __decorate } from "tslib";

this.joinRoomEvent = new EventEmitter();
this.leaveRoomEvent = new EventEmitter();
}
/**
* Joins a room
* @param roomToken {string} Room's or participant's token
* @param nickname {string} Participant's name to be displayed at room
*/
joinRoom(...args) {
this.joinRoomEvent.emit(args);
}
/**
* Leaves the room
*
*/
leaveRoom(...args) {
this.leaveRoomEvent.emit(args);
}
/**
* Changes the participant's nickname
* @param nick {string} New nickname to be displayed at room
*/
setNickname(nick) {

@@ -23,2 +40,2 @@ VideoSDK.setNickname(nick);

export { VideoroomsService };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlkZW9yb29tcy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGJhbWJ1c3RlY2gvdmlkZW9yb29tcy1uZy8iLCJzb3VyY2VzIjpbImxpYi92aWRlb3Jvb21zLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQU16RCxJQUFhLGlCQUFpQixHQUE5QixNQUFhLGlCQUFpQjtJQUE5QjtRQUNFLGtCQUFhLEdBQUcsSUFBSSxZQUFZLEVBQUUsQ0FBQztLQVVwQztJQVBDLFFBQVEsQ0FBQyxHQUFHLElB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CA9IG5ldyBFdmVudEVtaXR0ZXIoKTtcbiAgb25IYW5ndXA6IGFueTtcblxuICAvKipcbiAgICogSm9pbnMgYSByb29tXG4gICAqIEBwYXJhbSByb29tVG9rZW4ge3N0cmluZ30gUm9vbSdzIG9yIHBhcnRpY2lwYW50J3MgdG9rZW5cbiAgICogQHBhcmFtIG5pY2tuYW1lIHtzdHJpbmd9IFBhcnRpY2lwYW50J3MgbmFtZSB0byBiZSBkaXNwbGF5ZWQgYXQgcm9vbVxuICAgKi9cbiAgam9pblJvb20oLi4uYXJnczogYW55W10pIHtcbiAgICB0aGlzLmpvaW5Sb29tRXZlbnQuZW1pdChhcmdzKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBMZWF2ZXMgdGhlIHJvb21cbiAgICogXG4gICAqL1xuICBsZWF2ZVJvb20oLi4uYXJnczogYW55W10pIHtcbiAgICB0aGlzLmxlYXZlUm9vbUV2ZW50LmVtaXQoYXJncyk7XG4gIH1cblxuICAvKipcbiAgICogQ2hhbmdlcyB0aGUgcGFydGljaXBhbnQncyBuaWNrbmFtZVxuICAgKiBAcGFyYW0gbmljayB7c3RyaW5nfSBOZXcgbmlja25hbWUgdG8gYmUgZGlzcGxheWVkIGF0IHJvb21cbiAgICovXG4gIHNldE5pY2tuYW1lKG5pY2s6IHN0cmluZykge1xuICAgIFZpZGVvU0RLLnNldE5pY2tuYW1lKG5pY2spO1xuICB9XG59XG4iXX0=
import { __decorate, __read, __spread } from "tslib";
import { Component, Input } from "@angular/core";
import { Component, Input, Output, EventEmitter } from "@angular/core";
import { VideoroomsService } from './videorooms.service';

@@ -7,10 +7,31 @@ var VideoroomsComponent = /** @class */ (function () {

this.videoRoomService = videoRoomService;
videoRoomService.joinRoomEvent.subscribe(function (data) {
this.onRoomLeft = new EventEmitter();
this.onRoomJoined = new EventEmitter();
this.joinRoomObservable = videoRoomService.joinRoomEvent.subscribe(function (data) {
VideoSDK.joinRoom.apply(VideoSDK, __spread(data));
});
VideoSDK.events.on("roomLeft", videoRoomService.onHangup);
this.leaveRoomObservable = videoRoomService.leaveRoomEvent.subscribe(function (data) {
VideoSDK.hangUp();
});
}
VideoroomsComponent.prototype.ngOnInit = function () {
var _this = this;
VideoSDK.init("bambus-videorooms", this.options);
VideoSDK.events.on("roomLeft", function () {
_this.onRoomLeft.emit();
});
VideoSDK.events.on("roomJoined", function () {
_this.onRoomJoined.emit();
});
};
VideoroomsComponent.prototype.ngOnDestroy = function () {
if (!this.joinRoomObservable.closed) {
this.joinRoomObservable.unsubscribe();
}
if (!this.leaveRoomObservable.closed) {
this.leaveRoomObservable.unsubscribe();
}
VideoSDK.hangUp();
VideoSDK.destroy();
};
VideoroomsComponent.ctorParameters = function () { return [

@@ -22,2 +43,8 @@ { type: VideoroomsService }

], VideoroomsComponent.prototype, "options", void 0);
__decorate([
Output()
], VideoroomsComponent.prototype, "onRoomLeft", void 0);
__decorate([
Output()
], VideoroomsComponent.prototype, "onRoomJoined", void 0);
VideoroomsComponent = __decorate([

@@ -32,2 +59,2 @@ Component({

export { VideoroomsComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlkZW9yb29tcy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYmFtYnVzdGVjaC92aWRlb3Jvb21zLW5nLyIsInNvdXJjZXMiOlsibGliL3ZpZGVvcm9vbXMuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6RCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQVN6RDtJQUdFLDZCQUFvQixnQkFBbUM7UUFBbkMscUJBQWdCLEdBQWhCLGdCQUFnQixDQUFtQjtRQUNyRCxnQkFBZ0IsQ0FBQyxhQUFhLENBQUMsU0FBUyxDQUFDLFVBQUEsS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1VwKCk7XG4gICAgVmlkZW9TREsuZGVzdHJveSgpO1xuICB9XG59Il19

@@ -7,3 +7,9 @@ import { __decorate } from "tslib";

this.joinRoomEvent = new EventEmitter();
this.leaveRoomEvent = new EventEmitter();
}
/**
* Joins a room
* @param roomToken {string} Room's or participant's token
* @param nickname {string} Participant's name to be displayed at room
*/
VideoroomsService.prototype.joinRoom = function () {

@@ -16,2 +22,17 @@ var args = [];

};
/**
* Leaves the room
*
*/
VideoroomsService.prototype.leaveRoom = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
this.leaveRoomEvent.emit(args);
};
/**
* Changes the participant's nickname
* @param nick {string} New nickname to be displayed at room
*/
VideoroomsService.prototype.setNickname = function (nick) {

@@ -29,2 +50,2 @@ VideoSDK.setNickname(nick);

export { VideoroomsService };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlkZW9yb29tcy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGJhbWJ1c3RlY2gvdmlkZW9yb29tcy1uZy8iLCJzb3VyY2VzIjpbImxpYi92aWRlb3Jvb21zLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQU16RDtJQUFBO1FBQ0Usa0JBQWEsR0FBRyxJQUFJLFlBQVksRUFBRSxDQUFDO0tBVXBDO0lBUEMsb0NBQVEsR0FBUjtRQUFTLGNBQWM7YUFBZCxVQUFjLEVBQWQscUJBQWMsRUFBZCxJQUFjO1lBQWQseUJBQWM7O1FBQ3JCLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ2hDLENBQUM7SUFFRCx1Q0FBVyxHQUFYLFVBQVksSUFBWTtRQUN0QixRQUFRLENBQUMsV0FBVyxDQUF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oKTtcbiAgb25IYW5ndXA6IGFueTtcblxuICAvKipcbiAgICogSm9pbnMgYSByb29tXG4gICAqIEBwYXJhbSByb29tVG9rZW4ge3N0cmluZ30gUm9vbSdzIG9yIHBhcnRpY2lwYW50J3MgdG9rZW5cbiAgICogQHBhcmFtIG5pY2tuYW1lIHtzdHJpbmd9IFBhcnRpY2lwYW50J3MgbmFtZSB0byBiZSBkaXNwbGF5ZWQgYXQgcm9vbVxuICAgKi9cbiAgam9pblJvb20oLi4uYXJnczogYW55W10pIHtcbiAgICB0aGlzLmpvaW5Sb29tRXZlbnQuZW1pdChhcmdzKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBMZWF2ZXMgdGhlIHJvb21cbiAgICogXG4gICAqL1xuICBsZWF2ZVJvb20oLi4uYXJnczogYW55W10pIHtcbiAgICB0aGlzLmxlYXZlUm9vbUV2ZW50LmVtaXQoYXJncyk7XG4gIH1cblxuICAvKipcbiAgICogQ2hhbmdlcyB0aGUgcGFydGljaXBhbnQncyBuaWNrbmFtZVxuICAgKiBAcGFyYW0gbmljayB7c3RyaW5nfSBOZXcgbmlja25hbWUgdG8gYmUgZGlzcGxheWVkIGF0IHJvb21cbiAgICovXG4gIHNldE5pY2tuYW1lKG5pY2s6IHN0cmluZykge1xuICAgIFZpZGVvU0RLLnNldE5pY2tuYW1lKG5pY2spO1xuICB9XG59XG4iXX0=
import { __decorate } from 'tslib';
import { EventEmitter, ɵɵdefineInjectable, Injectable, Input, Component, NgModule } from '@angular/core';
import { EventEmitter, ɵɵdefineInjectable, Injectable, Input, Output, Component, NgModule } from '@angular/core';

@@ -7,6 +7,23 @@ let VideoroomsService = class VideoroomsService {

this.joinRoomEvent = new EventEmitter();
this.leaveRoomEvent = new EventEmitter();
}
/**
* Joins a room
* @param roomToken {string} Room's or participant's token
* @param nickname {string} Participant's name to be displayed at room
*/
joinRoom(...args) {
this.joinRoomEvent.emit(args);
}
/**
* Leaves the room
*
*/
leaveRoom(...args) {
this.leaveRoomEvent.emit(args);
}
/**
* Changes the participant's nickname
* @param nick {string} New nickname to be displayed at room
*/
setNickname(nick) {

@@ -26,10 +43,30 @@ VideoSDK.setNickname(nick);

this.videoRoomService = videoRoomService;
videoRoomService.joinRoomEvent.subscribe(data => {
this.onRoomLeft = new EventEmitter();
this.onRoomJoined = new EventEmitter();
this.joinRoomObservable = videoRoomService.joinRoomEvent.subscribe(data => {
VideoSDK.joinRoom(...data);
});
VideoSDK.events.on("roomLeft", videoRoomService.onHangup);
this.leaveRoomObservable = videoRoomService.leaveRoomEvent.subscribe(data => {
VideoSDK.hangUp();
});
}
ngOnInit() {
VideoSDK.init("bambus-videorooms", this.options);
VideoSDK.events.on("roomLeft", () => {
this.onRoomLeft.emit();
});
VideoSDK.events.on("roomJoined", () => {
this.onRoomJoined.emit();
});
}
ngOnDestroy() {
if (!this.joinRoomObservable.closed) {
this.joinRoomObservable.unsubscribe();
}
if (!this.leaveRoomObservable.closed) {
this.leaveRoomObservable.unsubscribe();
}
VideoSDK.hangUp();
VideoSDK.destroy();
}
};

@@ -42,2 +79,8 @@ VideoroomsComponent.ctorParameters = () => [

], VideoroomsComponent.prototype, "options", void 0);
__decorate([
Output()
], VideoroomsComponent.prototype, "onRoomLeft", void 0);
__decorate([
Output()
], VideoroomsComponent.prototype, "onRoomJoined", void 0);
VideoroomsComponent = __decorate([

@@ -44,0 +87,0 @@ Component({

import { __decorate, __spread } from 'tslib';
import { EventEmitter, ɵɵdefineInjectable, Injectable, Input, Component, NgModule } from '@angular/core';
import { EventEmitter, ɵɵdefineInjectable, Injectable, Input, Output, Component, NgModule } from '@angular/core';

@@ -7,3 +7,9 @@ var VideoroomsService = /** @class */ (function () {

this.joinRoomEvent = new EventEmitter();
this.leaveRoomEvent = new EventEmitter();
}
/**
* Joins a room
* @param roomToken {string} Room's or participant's token
* @param nickname {string} Participant's name to be displayed at room
*/
VideoroomsService.prototype.joinRoom = function () {

@@ -16,2 +22,17 @@ var args = [];

};
/**
* Leaves the room
*
*/
VideoroomsService.prototype.leaveRoom = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
this.leaveRoomEvent.emit(args);
};
/**
* Changes the participant's nickname
* @param nick {string} New nickname to be displayed at room
*/
VideoroomsService.prototype.setNickname = function (nick) {

@@ -32,10 +53,31 @@ VideoSDK.setNickname(nick);

this.videoRoomService = videoRoomService;
videoRoomService.joinRoomEvent.subscribe(function (data) {
this.onRoomLeft = new EventEmitter();
this.onRoomJoined = new EventEmitter();
this.joinRoomObservable = videoRoomService.joinRoomEvent.subscribe(function (data) {
VideoSDK.joinRoom.apply(VideoSDK, __spread(data));
});
VideoSDK.events.on("roomLeft", videoRoomService.onHangup);
this.leaveRoomObservable = videoRoomService.leaveRoomEvent.subscribe(function (data) {
VideoSDK.hangUp();
});
}
VideoroomsComponent.prototype.ngOnInit = function () {
var _this = this;
VideoSDK.init("bambus-videorooms", this.options);
VideoSDK.events.on("roomLeft", function () {
_this.onRoomLeft.emit();
});
VideoSDK.events.on("roomJoined", function () {
_this.onRoomJoined.emit();
});
};
VideoroomsComponent.prototype.ngOnDestroy = function () {
if (!this.joinRoomObservable.closed) {
this.joinRoomObservable.unsubscribe();
}
if (!this.leaveRoomObservable.closed) {
this.leaveRoomObservable.unsubscribe();
}
VideoSDK.hangUp();
VideoSDK.destroy();
};
VideoroomsComponent.ctorParameters = function () { return [

@@ -47,2 +89,8 @@ { type: VideoroomsService }

], VideoroomsComponent.prototype, "options", void 0);
__decorate([
Output()
], VideoroomsComponent.prototype, "onRoomLeft", void 0);
__decorate([
Output()
], VideoroomsComponent.prototype, "onRoomJoined", void 0);
VideoroomsComponent = __decorate([

@@ -49,0 +97,0 @@ Component({

@@ -1,8 +0,14 @@

import { OnInit } from "@angular/core";
import { OnInit, EventEmitter } from "@angular/core";
import { VideoroomsService } from './videorooms.service';
import { Subscription } from 'rxjs';
export declare class VideoroomsComponent implements OnInit {
private videoRoomService;
options: any;
onRoomLeft: EventEmitter<any>;
onRoomJoined: EventEmitter<any>;
joinRoomObservable: Subscription;
leaveRoomObservable: Subscription;
constructor(videoRoomService: VideoroomsService);
ngOnInit(): void;
ngOnDestroy(): void;
}
import { EventEmitter } from '@angular/core';
export declare class VideoroomsService {
joinRoomEvent: EventEmitter<any>;
leaveRoomEvent: EventEmitter<any>;
onHangup: any;
/**
* Joins a room
* @param roomToken {string} Room's or participant's token
* @param nickname {string} Participant's name to be displayed at room
*/
joinRoom(...args: any[]): void;
/**
* Leaves the room
*
*/
leaveRoom(...args: any[]): void;
/**
* Changes the participant's nickname
* @param nick {string} New nickname to be displayed at room
*/
setNickname(nick: string): void;
}

@@ -5,11 +5,11 @@ {

"description": "Componente de Angular de SDK de videorooms, hecho por BambusTech",
"version": "0.0.2",
"version": "0.0.3",
"peerDependencies": {
"@angular/common": "^9.1.4",
"@angular/core": "^9.1.4",
"tslib": "^1.10.0",
"@bambustech/videorooms-sdk": "latest"
},
"dependencies": {
"@bambustech/videorooms-sdk": "latest"
"@bambustech/videorooms-sdk": "latest",
"tslib": "^1.10.0"
},

@@ -16,0 +16,0 @@ "keywords": [

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc