openvidu-library-angular: Fixed bug with tokens and screenshare

This commit is contained in:
CSantos 2019-04-25 17:34:22 +02:00
parent 3e37a89c22
commit de6126b8bf
3 changed files with 44 additions and 67 deletions

View File

@ -6534,7 +6534,8 @@
"neo-async": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz",
"integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA=="
"integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==",
"dev": true
},
"ngx-linkifyjs": {
"version": "1.3.0",
@ -6956,9 +6957,8 @@
}
},
"openvidu-angular": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/openvidu-angular/-/openvidu-angular-2.9.0.tgz",
"integrity": "sha512-oygZ37Ynrb1pnH6ownWeSYJJUM9y0+17/ovbwcnLytvr/NsDMON9PrsPNMoVGc1/fdt9u4cOIxF08BvaaZvMzw==",
"version": "file:openvidu-angular-2.9.0.tgz",
"integrity": "sha512-yuS0Qa2bRWGY+HPrfi177EKOfFPgYKRF1989uOHCcOen4WIFVfnmasbn8clYwz34zxy7uvtp9HgFibPdsKB7eQ==",
"requires": {
"@angular/animations": "7.2.7",
"@angular/cdk": "7.3.3",
@ -7130,7 +7130,18 @@
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
"integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
"requires": {
"micromatch": "^3.1.4"
"micromatch": "^3.1.4",
"normalize-path": "^2.1.1"
},
"dependencies": {
"normalize-path": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
"integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
"requires": {
"remove-trailing-separator": "^1.0.1"
}
}
}
},
"argparse": {
@ -7934,6 +7945,11 @@
"number-is-nan": "^1.0.0"
}
},
"dash-ast": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz",
"integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA=="
},
"date-now": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
@ -9406,14 +9422,6 @@
"uglify-js": "^3.1.4"
},
"dependencies": {
"async": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
"requires": {
"lodash": "^4.17.10"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@ -9661,14 +9669,6 @@
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-builtin-module": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
"requires": {
"builtin-modules": "^1.0.0"
}
},
"is-data-descriptor": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
@ -9919,11 +9919,6 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
},
"lodash.debounce": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168="
},
"lodash.memoize": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz",
@ -10199,6 +10194,11 @@
"resolved": "https://registry.npmjs.org/ncp/-/ncp-0.5.1.tgz",
"integrity": "sha1-dDmFMW49tFkoG1hxaehFc1oFQ58="
},
"neo-async": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz",
"integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA=="
},
"nopt": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
@ -10768,14 +10768,6 @@
"inherits": "^2.0.1"
}
},
"rtcpeerconnection-shim": {
"version": "1.2.15",
"resolved": "https://registry.npmjs.org/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz",
"integrity": "sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw==",
"requires": {
"sdp": "^2.6.0"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
@ -10804,11 +10796,6 @@
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
},
"sdp": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/sdp/-/sdp-2.9.0.tgz",
"integrity": "sha512-XAVZQO4qsfzVTHorF49zCpkdxiGmPNjA8ps8RcJGtGP3QJ/A8I9/SVg/QnkAFDMXIyGbHZBBFwYBw6WdnhT96w=="
},
"semver": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
@ -11319,20 +11306,6 @@
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA=="
},
"esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
"js-yaml": {
"version": "3.12.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz",
"integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==",
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
}
}
}
},
@ -11374,7 +11347,15 @@
"minimatch": "^3.0.0",
"progress": "^2.0.0",
"shelljs": "^0.8.2",
"typedoc-default-themes": "^0.5.0"
"typedoc-default-themes": "^0.5.0",
"typescript": "3.2.x"
},
"dependencies": {
"typescript": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz",
"integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg=="
}
}
},
"typedoc-default-themes": {
@ -11419,6 +11400,7 @@
"integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==",
"requires": {
"acorn-node": "^1.3.0",
"dash-ast": "^1.0.0",
"get-assigned-identifiers": "^1.2.0",
"simple-concat": "^1.0.0",
"xtend": "^4.0.1"
@ -11582,15 +11564,6 @@
"resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz",
"integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw=="
},
"webrtc-adapter": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-7.1.1.tgz",
"integrity": "sha512-ybi+GBPKd9s4HfnWVaWraKZkYqJeptyNzEEmtTAl1QRbT8kqMzsuwPH5UmSJGERb5fNfXg+EvQIM0v0Pdp3WRg==",
"requires": {
"rtcpeerconnection-shim": "^1.2.15",
"sdp": "^2.9.0"
}
},
"websocket-driver": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz",

View File

@ -19,7 +19,7 @@
</div>
<div *ngIf="session" id="session">
<opv-session #ovSessionComponent [sessionName]="mySessionId" [user]="myUserName" [token]="token" (leaveSession)="handlerLeaveSessionEvent($event)"
<opv-session #ovSessionComponent [sessionName]="mySessionId" [user]="myUserName" [tokens]="tokens" (leaveSession)="handlerLeaveSessionEvent($event)"
(joinSession)="handlerJoinSessionEvent($event)" (error)="handlerErrorEvent($event)">
</opv-session>
</div>

View File

@ -16,7 +16,7 @@ export class AppComponent {
// Join form
mySessionId = 'SessionA';
myUserName = 'Participant' + Math.floor(Math.random() * 100);
token: string;
tokens: string[] = [];
session = false;
ovSession: Session;
@ -31,8 +31,11 @@ export class AppComponent {
joinSession() {
this.getToken().then((token) => {
this.token = token;
this.session = true;
this.tokens.push(token);
this.getToken().then((token2) => {
this.tokens.push(token2);
this.session = true;
});
});
}
@ -42,6 +45,7 @@ export class AppComponent {
handlerLeaveSessionEvent(event): void {
this.session = false;
this.tokens = [];
}
handlerErrorEvent(event): void {