@rtsee/ngx 0.0.141 → 0.0.142
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.
|
@@ -322,17 +322,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
322
322
|
}] } });
|
|
323
323
|
|
|
324
324
|
class RTSeeControlsComponent {
|
|
325
|
-
|
|
325
|
+
get canSwitchCamera() {
|
|
326
|
+
if (!this.rtsee?.camera) {
|
|
327
|
+
return false;
|
|
328
|
+
}
|
|
329
|
+
if ((this.rtsee.videoInputDevices?.length || 0) > 1) {
|
|
330
|
+
return true;
|
|
331
|
+
}
|
|
332
|
+
if (typeof navigator !== 'undefined') {
|
|
333
|
+
return /iPhone|iPad|iPod|Android/i.test(navigator.userAgent || '');
|
|
334
|
+
}
|
|
335
|
+
return false;
|
|
336
|
+
}
|
|
337
|
+
get canShareScreen() {
|
|
338
|
+
return (typeof navigator !== 'undefined' &&
|
|
339
|
+
typeof navigator.mediaDevices?.getDisplayMedia === 'function');
|
|
340
|
+
}
|
|
341
|
+
onSwitchCameraClicked(event) {
|
|
342
|
+
event.stopPropagation();
|
|
343
|
+
void this.rtsee.switchCamera();
|
|
344
|
+
}
|
|
345
|
+
onPresentClicked(event) {
|
|
346
|
+
event.stopPropagation();
|
|
326
347
|
return this.rtsee.isPresenter
|
|
327
348
|
? this.rtsee.stopScreenShare()
|
|
328
349
|
: this.rtsee.startScreenShare();
|
|
329
350
|
}
|
|
351
|
+
onCornerModeClicked(event) {
|
|
352
|
+
event.stopPropagation();
|
|
353
|
+
this.rtsee.uiControls.isExpanded = false;
|
|
354
|
+
}
|
|
330
355
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RTSeeControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
331
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RTSeeControlsComponent, isStandalone: true, selector: "ngx-rtsee-controls", inputs: { rtsee: "rtsee", fullScreenMode: "fullScreenMode" }, ngImport: i0, template: "<div class=\"rtsee-controls\" [ngClass]=\"{'rtsee-full-screen-controls' : fullScreenMode }\">\n <div class=\"rtsee-bottom-panel\">\n <div class=\"mic rtsee-buttons-container\">\n @if (rtsee.microphone) {\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n (click)=\"
|
|
356
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RTSeeControlsComponent, isStandalone: true, selector: "ngx-rtsee-controls", inputs: { rtsee: "rtsee", fullScreenMode: "fullScreenMode" }, ngImport: i0, template: "<div class=\"rtsee-controls\" [ngClass]=\"{'rtsee-full-screen-controls' : fullScreenMode }\">\n <div class=\"rtsee-bottom-panel\">\n <div class=\"mic rtsee-buttons-container\"\n [ngClass]=\"{'rtsee-button-inactive': !rtsee.microphone}\">\n @if (rtsee.microphone) {\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Mute microphone\"\n (click)=\"$event.stopPropagation(); rtsee.disableMicrophone()\"\n >\n <span class=\"material-icons-outlined\">mic_none</span>\n </button>\n }\n @if (!rtsee.microphone) {\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Unmute microphone\"\n (click)=\"$event.stopPropagation(); rtsee.enableMicrophone()\"\n >\n <span class=\"material-icons-outlined\">mic_off</span>\n </button>\n }\n </div>\n\n @if (fullScreenMode) {\n <div class=\"video-camera rtsee-buttons-container\"\n [ngClass]=\"{'rtsee-button-inactive': !rtsee.camera}\">\n @if (rtsee.camera) {\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Turn off camera\"\n (click)=\"$event.stopPropagation(); rtsee.disableCamera()\"\n >\n <span class=\"material-icons-outlined\">videocam</span>\n </button>\n }\n @if (!rtsee.camera) {\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Turn on camera\"\n (click)=\"$event.stopPropagation(); rtsee.enableCamera()\"\n >\n <span class=\"material-icons-outlined\">videocam_off</span>\n </button>\n }\n </div>\n\n @if (canSwitchCamera) {\n <div class=\"switch-camera rtsee-buttons-container\">\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Switch camera\"\n (click)=\"onSwitchCameraClicked($event)\"\n >\n <span class=\"material-icons-outlined\">cameraswitch</span>\n </button>\n </div>\n }\n\n @if (canShareScreen) {\n <div class=\"present rtsee-buttons-container\"\n [ngClass]=\"{'rtsee-present-button-container': rtsee.isPresenter}\"\n >\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Share screen\"\n (click)=\"onPresentClicked($event)\"\n >\n <span class=\"material-icons-outlined\">present_to_all</span>\n </button>\n </div>\n }\n\n <div class=\"corner-mode rtsee-buttons-container\">\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Corner mode\"\n aria-label=\"Corner mode\"\n (click)=\"onCornerModeClicked($event)\"\n >\n <span class=\"material-icons-outlined\">picture_in_picture_alt</span>\n </button>\n </div>\n }\n\n <div class=\"call-end rtsee-buttons-container\">\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Hang up\"\n aria-label=\"Hang up\"\n (click)=\"$event.stopPropagation(); rtsee.end()\"\n >\n <span class=\"material-icons-outlined\">call_end</span>\n </button>\n </div>\n </div>\n</div>\n", styles: [".rtsee-controls{display:inline-block;height:100%}.rtsee-controls .rtsee-buttons-container{height:45px;width:45px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 9px;cursor:pointer;background-color:#fff}.rtsee-controls .rtsee-buttons-container .rtsee-ripple-button{border:none;outline:none;background-color:transparent;cursor:pointer}.rtsee-controls .rtsee-buttons-container:last-child{margin-right:0}.rtsee-controls .rtsee-buttons-container:first-child{margin-left:0}.rtsee-controls .rtsee-buttons-container .mdc-icon-button{background-color:#333;color:#fff}.rtsee-controls .rtsee-buttons-container.call-end{background-color:#ff3232;color:#fff}.rtsee-controls .rtsee-buttons-container.call-end .rtsee-ripple-button{color:#fff}.rtsee-controls .rtsee-buttons-container.rtsee-button-inactive{background-color:#ffffffd9;color:#111}.rtsee-controls .rtsee-buttons-container.rtsee-present-button-container .mdc-icon-button{background-color:#090}.rtsee-controls .full-screen{align-self:flex-end;padding:12px;cursor:pointer}.rtsee-controls .rtsee-bottom-panel{padding:12px;display:flex;justify-content:center;align-items:center;border-radius:45px;background-color:#000000b3}.rtsee-controls.rtsee-full-screen-controls .rtsee-buttons-container{height:60px;width:60px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
332
357
|
}
|
|
333
358
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RTSeeControlsComponent, decorators: [{
|
|
334
359
|
type: Component,
|
|
335
|
-
args: [{ selector: 'ngx-rtsee-controls', imports: [NgClass], standalone: true, template: "<div class=\"rtsee-controls\" [ngClass]=\"{'rtsee-full-screen-controls' : fullScreenMode }\">\n <div class=\"rtsee-bottom-panel\">\n <div class=\"mic rtsee-buttons-container\">\n @if (rtsee.microphone) {\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n (click)=\"
|
|
360
|
+
args: [{ selector: 'ngx-rtsee-controls', imports: [NgClass], standalone: true, template: "<div class=\"rtsee-controls\" [ngClass]=\"{'rtsee-full-screen-controls' : fullScreenMode }\">\n <div class=\"rtsee-bottom-panel\">\n <div class=\"mic rtsee-buttons-container\"\n [ngClass]=\"{'rtsee-button-inactive': !rtsee.microphone}\">\n @if (rtsee.microphone) {\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Mute microphone\"\n (click)=\"$event.stopPropagation(); rtsee.disableMicrophone()\"\n >\n <span class=\"material-icons-outlined\">mic_none</span>\n </button>\n }\n @if (!rtsee.microphone) {\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Unmute microphone\"\n (click)=\"$event.stopPropagation(); rtsee.enableMicrophone()\"\n >\n <span class=\"material-icons-outlined\">mic_off</span>\n </button>\n }\n </div>\n\n @if (fullScreenMode) {\n <div class=\"video-camera rtsee-buttons-container\"\n [ngClass]=\"{'rtsee-button-inactive': !rtsee.camera}\">\n @if (rtsee.camera) {\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Turn off camera\"\n (click)=\"$event.stopPropagation(); rtsee.disableCamera()\"\n >\n <span class=\"material-icons-outlined\">videocam</span>\n </button>\n }\n @if (!rtsee.camera) {\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Turn on camera\"\n (click)=\"$event.stopPropagation(); rtsee.enableCamera()\"\n >\n <span class=\"material-icons-outlined\">videocam_off</span>\n </button>\n }\n </div>\n\n @if (canSwitchCamera) {\n <div class=\"switch-camera rtsee-buttons-container\">\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Switch camera\"\n (click)=\"onSwitchCameraClicked($event)\"\n >\n <span class=\"material-icons-outlined\">cameraswitch</span>\n </button>\n </div>\n }\n\n @if (canShareScreen) {\n <div class=\"present rtsee-buttons-container\"\n [ngClass]=\"{'rtsee-present-button-container': rtsee.isPresenter}\"\n >\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Share screen\"\n (click)=\"onPresentClicked($event)\"\n >\n <span class=\"material-icons-outlined\">present_to_all</span>\n </button>\n </div>\n }\n\n <div class=\"corner-mode rtsee-buttons-container\">\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Corner mode\"\n aria-label=\"Corner mode\"\n (click)=\"onCornerModeClicked($event)\"\n >\n <span class=\"material-icons-outlined\">picture_in_picture_alt</span>\n </button>\n </div>\n }\n\n <div class=\"call-end rtsee-buttons-container\">\n <button class=\"rtsee-ripple-button\"\n type=\"button\"\n title=\"Hang up\"\n aria-label=\"Hang up\"\n (click)=\"$event.stopPropagation(); rtsee.end()\"\n >\n <span class=\"material-icons-outlined\">call_end</span>\n </button>\n </div>\n </div>\n</div>\n", styles: [".rtsee-controls{display:inline-block;height:100%}.rtsee-controls .rtsee-buttons-container{height:45px;width:45px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 9px;cursor:pointer;background-color:#fff}.rtsee-controls .rtsee-buttons-container .rtsee-ripple-button{border:none;outline:none;background-color:transparent;cursor:pointer}.rtsee-controls .rtsee-buttons-container:last-child{margin-right:0}.rtsee-controls .rtsee-buttons-container:first-child{margin-left:0}.rtsee-controls .rtsee-buttons-container .mdc-icon-button{background-color:#333;color:#fff}.rtsee-controls .rtsee-buttons-container.call-end{background-color:#ff3232;color:#fff}.rtsee-controls .rtsee-buttons-container.call-end .rtsee-ripple-button{color:#fff}.rtsee-controls .rtsee-buttons-container.rtsee-button-inactive{background-color:#ffffffd9;color:#111}.rtsee-controls .rtsee-buttons-container.rtsee-present-button-container .mdc-icon-button{background-color:#090}.rtsee-controls .full-screen{align-self:flex-end;padding:12px;cursor:pointer}.rtsee-controls .rtsee-bottom-panel{padding:12px;display:flex;justify-content:center;align-items:center;border-radius:45px;background-color:#000000b3}.rtsee-controls.rtsee-full-screen-controls .rtsee-buttons-container{height:60px;width:60px}\n"] }]
|
|
336
361
|
}], propDecorators: { rtsee: [{
|
|
337
362
|
type: Input
|
|
338
363
|
}], fullScreenMode: [{
|
|
@@ -420,21 +445,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
420
445
|
|
|
421
446
|
class RtseePeerComponent {
|
|
422
447
|
constructor() {
|
|
448
|
+
this.compact = false;
|
|
423
449
|
this.intervalLength = 1000;
|
|
424
450
|
this.noiceLevel = 0;
|
|
425
451
|
}
|
|
452
|
+
get displayName() {
|
|
453
|
+
return (this.peer?.name || '').replace(/\*/g, ' ').trim();
|
|
454
|
+
}
|
|
455
|
+
get initialLetter() {
|
|
456
|
+
const clean = this.displayName || this.peer?.clientId || '?';
|
|
457
|
+
return clean.charAt(0).toUpperCase();
|
|
458
|
+
}
|
|
426
459
|
ngAfterViewInit() {
|
|
427
460
|
if (!this.audioOutput) {
|
|
428
461
|
return;
|
|
429
462
|
}
|
|
430
463
|
this.peer.setAudioOutputElement(this.audioOutput.nativeElement);
|
|
431
464
|
}
|
|
465
|
+
ngOnDestroy() {
|
|
466
|
+
const audioEl = this.audioOutput?.nativeElement;
|
|
467
|
+
if (audioEl) {
|
|
468
|
+
try {
|
|
469
|
+
audioEl.pause();
|
|
470
|
+
audioEl.srcObject = null;
|
|
471
|
+
}
|
|
472
|
+
catch { }
|
|
473
|
+
}
|
|
474
|
+
const videoEl = this.videoOutput?.nativeElement;
|
|
475
|
+
if (videoEl) {
|
|
476
|
+
try {
|
|
477
|
+
videoEl.pause();
|
|
478
|
+
videoEl.srcObject = null;
|
|
479
|
+
videoEl.removeAttribute('src');
|
|
480
|
+
videoEl.load();
|
|
481
|
+
}
|
|
482
|
+
catch { }
|
|
483
|
+
}
|
|
484
|
+
}
|
|
432
485
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RtseePeerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
433
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: RtseePeerComponent, isStandalone: true, selector: "ngx-rtsee-peer", inputs: { peer: "peer" }, viewQueries: [{ propertyName: "audioOutput", first: true, predicate: ["audioOutput"], descendants: true }, { propertyName: "videoOutput", first: true, predicate: ["videoOutput"], descendants: true }], ngImport: i0, template: "<div class=\"rtsee-peer\" [ngClass]=\"{\n'rtsee-peer-video-disabled': !peer.remoteVideoStream || !peer.camera\n}\">\n <div class=\"rtsee-peer-content\">\n <div class=\"rtsee-peer-photo\" *ngIf=\"!peer.camera\">\n <div class=\"rtsee-peer-photo-wrapper\">\n <div
|
|
486
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: RtseePeerComponent, isStandalone: true, selector: "ngx-rtsee-peer", inputs: { peer: "peer", compact: "compact" }, viewQueries: [{ propertyName: "audioOutput", first: true, predicate: ["audioOutput"], descendants: true }, { propertyName: "videoOutput", first: true, predicate: ["videoOutput"], descendants: true }], ngImport: i0, template: "<div class=\"rtsee-peer\" [ngClass]=\"{\n 'rtsee-peer-video-disabled': !peer.remoteVideoStream || !peer.camera,\n 'rtsee-peer-compact': compact\n}\">\n <div class=\"rtsee-peer-content\">\n <div class=\"rtsee-peer-photo\" *ngIf=\"!peer.camera || !peer.remoteVideoStream\">\n <div class=\"rtsee-peer-photo-wrapper\">\n <div *ngIf=\"peer.imageUrl\"\n [style.background-image]=\"'url(' + peer.imageUrl + ')'\"\n class=\"rtsee-peer-photo-image\"\n ></div>\n <div *ngIf=\"!peer.imageUrl\" class=\"rtsee-peer-photo-fallback\">\n {{ initialLetter }}\n </div>\n </div>\n <div class=\"rtsee-peer-info\" *ngIf=\"displayName\">\n <p class=\"rtsee-peer-name\">{{ displayName }}</p>\n </div>\n </div>\n <audio #audioOutput\n [autoplay]=\"true\"\n [srcObject]=\"peer.remoteAudioStream\"\n ></audio>\n <video #videoOutput\n class=\"rtsee-peer-video\"\n [autoplay]=\"true\"\n [muted]=\"true\"\n [srcObject]=\"peer.remoteVideoStream\"\n playsinline=\"true\"\n >\n </video>\n <div class=\"rtsee-peer-name-badge\" *ngIf=\"!compact && displayName\">\n <span class=\"material-icons-outlined rtsee-peer-mic-muted-icon\" *ngIf=\"!peer.microphone\">mic_off</span>\n <span>{{ displayName }}</span>\n </div>\n <div class=\"rtsee-peer-soundbar\" *ngIf=\"!compact && peer.microphone\">\n <ngx-rtsee-soundbar [peer]=\"peer\"></ngx-rtsee-soundbar>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: RtseeSoundbarComponent, selector: "ngx-rtsee-soundbar", inputs: ["peer"] }] }); }
|
|
434
487
|
}
|
|
435
488
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RtseePeerComponent, decorators: [{
|
|
436
489
|
type: Component,
|
|
437
|
-
args: [{ selector: 'ngx-rtsee-peer', imports: [NgClass, NgIf, RtseeSoundbarComponent], standalone: true, template: "<div class=\"rtsee-peer\" [ngClass]=\"{\n'rtsee-peer-video-disabled': !peer.remoteVideoStream || !peer.camera\n}\">\n <div class=\"rtsee-peer-content\">\n <div class=\"rtsee-peer-photo\" *ngIf=\"!peer.camera\">\n <div class=\"rtsee-peer-photo-wrapper\">\n <div
|
|
490
|
+
args: [{ selector: 'ngx-rtsee-peer', imports: [NgClass, NgIf, RtseeSoundbarComponent], standalone: true, template: "<div class=\"rtsee-peer\" [ngClass]=\"{\n 'rtsee-peer-video-disabled': !peer.remoteVideoStream || !peer.camera,\n 'rtsee-peer-compact': compact\n}\">\n <div class=\"rtsee-peer-content\">\n <div class=\"rtsee-peer-photo\" *ngIf=\"!peer.camera || !peer.remoteVideoStream\">\n <div class=\"rtsee-peer-photo-wrapper\">\n <div *ngIf=\"peer.imageUrl\"\n [style.background-image]=\"'url(' + peer.imageUrl + ')'\"\n class=\"rtsee-peer-photo-image\"\n ></div>\n <div *ngIf=\"!peer.imageUrl\" class=\"rtsee-peer-photo-fallback\">\n {{ initialLetter }}\n </div>\n </div>\n <div class=\"rtsee-peer-info\" *ngIf=\"displayName\">\n <p class=\"rtsee-peer-name\">{{ displayName }}</p>\n </div>\n </div>\n <audio #audioOutput\n [autoplay]=\"true\"\n [srcObject]=\"peer.remoteAudioStream\"\n ></audio>\n <video #videoOutput\n class=\"rtsee-peer-video\"\n [autoplay]=\"true\"\n [muted]=\"true\"\n [srcObject]=\"peer.remoteVideoStream\"\n playsinline=\"true\"\n >\n </video>\n <div class=\"rtsee-peer-name-badge\" *ngIf=\"!compact && displayName\">\n <span class=\"material-icons-outlined rtsee-peer-mic-muted-icon\" *ngIf=\"!peer.microphone\">mic_off</span>\n <span>{{ displayName }}</span>\n </div>\n <div class=\"rtsee-peer-soundbar\" *ngIf=\"!compact && peer.microphone\">\n <ngx-rtsee-soundbar [peer]=\"peer\"></ngx-rtsee-soundbar>\n </div>\n </div>\n</div>\n" }]
|
|
438
491
|
}], ctorParameters: () => [], propDecorators: { audioOutput: [{
|
|
439
492
|
type: ViewChild,
|
|
440
493
|
args: ['audioOutput']
|
|
@@ -443,20 +496,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
443
496
|
args: ['videoOutput']
|
|
444
497
|
}], peer: [{
|
|
445
498
|
type: Input
|
|
499
|
+
}], compact: [{
|
|
500
|
+
type: Input
|
|
446
501
|
}] } });
|
|
447
502
|
|
|
448
503
|
class RTSeeConferenceComponent {
|
|
449
504
|
constructor() {
|
|
450
505
|
this.settingsViewEnabled = false;
|
|
451
506
|
}
|
|
507
|
+
ngOnDestroy() {
|
|
508
|
+
this.releaseVideoElement(this.localVideoEl?.nativeElement);
|
|
509
|
+
this.releaseVideoElement(this.screenShareVideoEl?.nativeElement);
|
|
510
|
+
}
|
|
511
|
+
releaseVideoElement(video) {
|
|
512
|
+
if (!video) {
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
try {
|
|
516
|
+
video.pause();
|
|
517
|
+
video.srcObject = null;
|
|
518
|
+
video.removeAttribute('src');
|
|
519
|
+
video.load();
|
|
520
|
+
}
|
|
521
|
+
catch { }
|
|
522
|
+
}
|
|
452
523
|
toggleSettings() {
|
|
453
524
|
this.settingsViewEnabled = !this.settingsViewEnabled;
|
|
454
525
|
}
|
|
455
|
-
toggleFullScreenMode() {
|
|
526
|
+
toggleFullScreenMode(event) {
|
|
527
|
+
event?.stopPropagation();
|
|
456
528
|
this.rtSee.uiControls.toggle();
|
|
457
529
|
}
|
|
530
|
+
expandToFullScreen(event) {
|
|
531
|
+
event?.stopPropagation();
|
|
532
|
+
this.rtSee.uiControls.isExpanded = true;
|
|
533
|
+
}
|
|
534
|
+
onShellClicked(event) {
|
|
535
|
+
if (this.rtSee.uiControls.isExpanded) {
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
const target = event.target;
|
|
539
|
+
if (target?.closest('button, .rtsee-controls-wrapper, .rtsee-window-controls, ngx-rtsee-settings')) {
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
this.rtSee.uiControls.isExpanded = true;
|
|
543
|
+
}
|
|
544
|
+
isPeerVisibleInView(peer) {
|
|
545
|
+
if (this.rtSee.uiControls.isExpanded) {
|
|
546
|
+
return true;
|
|
547
|
+
}
|
|
548
|
+
const peers = this.rtSee.rtcPeerConnections?.connections || [];
|
|
549
|
+
if (peers.length <= 1) {
|
|
550
|
+
return true;
|
|
551
|
+
}
|
|
552
|
+
const active = this.rtSee.activeSpeakerPeer || peers[0];
|
|
553
|
+
return peer.clientId === active?.clientId;
|
|
554
|
+
}
|
|
555
|
+
get callHeaderTitle() {
|
|
556
|
+
const peers = this.rtSee.rtcPeerConnections?.connections || [];
|
|
557
|
+
if (!peers.length) {
|
|
558
|
+
return 'Waiting for others to join…';
|
|
559
|
+
}
|
|
560
|
+
if (peers.length === 1) {
|
|
561
|
+
return (peers[0].name || 'In call').replace(/\*/g, ' ').trim();
|
|
562
|
+
}
|
|
563
|
+
return `${peers.length + 1} in call`;
|
|
564
|
+
}
|
|
458
565
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RTSeeConferenceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
459
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RTSeeConferenceComponent, isStandalone: true, selector: "rtsee-conference", inputs: { rtSee: "rtSee" }, ngImport: i0, template: "<div class=\"rtsee-conference-shell\"
|
|
566
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RTSeeConferenceComponent, isStandalone: true, selector: "rtsee-conference", inputs: { rtSee: "rtSee" }, viewQueries: [{ propertyName: "localVideoEl", first: true, predicate: ["localVideoEl"], descendants: true }, { propertyName: "screenShareVideoEl", first: true, predicate: ["screenShareVideoEl"], descendants: true }], ngImport: i0, template: "<div class=\"rtsee-conference-shell\"\n (click)=\"onShellClicked($event)\"\n [ngClass]=\"{\n 'rtsee-conference-shell-expanded': rtSee.uiControls.isExpanded,\n 'rtsee-conference-shell-minified': !rtSee.uiControls.isExpanded,\n 'rtsee-conference-shell-no-companions': !rtSee.rtcPeerConnections.connections?.length\n }\">\n @if (rtSee.uiControls.isExpanded) {\n <div class=\"rtsee-fullscreen-header\">\n <span class=\"material-icons-outlined rtsee-fullscreen-header-icon\">videocam</span>\n <span class=\"rtsee-fullscreen-header-title\">{{ callHeaderTitle }}</span>\n </div>\n }\n\n @if (rtSee.localStream && rtSee.camera) {\n <div class=\"rtsee-local-peer\">\n <video #localVideoEl\n class=\"rtsee-local-video\"\n [autoplay]=\"true\"\n [muted]=\"true\"\n [srcObject]=\"rtSee.localStream\"\n playsinline=\"true\"\n ></video>\n </div>\n }\n\n @if (!rtSee.uiControls.isExpanded) {\n <div class=\"rtsee-window-controls\">\n <button type=\"button\"\n (click)=\"expandToFullScreen($event)\"\n title=\"Expand to full screen\"\n aria-label=\"Expand to full screen\"\n class=\"rtsee-window-controls-button rtsee-ripple-button\"\n >\n <span class=\"material-icons-outlined\">open_in_full</span>\n </button>\n </div>\n }\n\n @if (rtSee.settingsOpened) {\n <ngx-rtsee-settings [rtSee]=\"rtSee\" [fullScreenMode]=\"rtSee.uiControls.isExpanded\"></ngx-rtsee-settings>\n }\n\n @if (rtSee.screenSharePeer) {\n <div class=\"rtsee-screen-share\">\n <video #screenShareVideoEl\n [autoplay]=\"true\"\n [muted]=\"true\"\n [srcObject]=\"rtSee.screenSharePeer.remoteVideoStream\"\n playsinline=\"true\"\n class=\"rtsee-screen-share-video\"\n ></video>\n </div>\n }\n\n @if (!rtSee.rtcPeerConnections.connections?.length && !rtSee.camera) {\n <div class=\"rtsee-waiting-placeholder\">\n <span class=\"material-icons-outlined rtsee-waiting-icon\">call</span>\n <span class=\"rtsee-waiting-text\">{{ callHeaderTitle }}</span>\n </div>\n }\n\n <div class=\"rtsee-peers\" [ngClass]=\"{\n 'rtsee-peers-alone': !rtSee.rtcPeerConnections.connections?.length,\n 'rtsee-peers-one': !rtSee.uiControls.isExpanded || rtSee.rtcPeerConnections.connections?.length === 1,\n 'rtsee-peers-two-grid': rtSee.uiControls.isExpanded\n && rtSee.rtcPeerConnections.connections?.length === 2,\n 'rtsee-peers-three-grid': rtSee.uiControls.isExpanded\n && rtSee.rtcPeerConnections.connections?.length\n && rtSee.rtcPeerConnections.connections.length > 2\n && rtSee.rtcPeerConnections.connections.length <= 4,\n 'rtsee-peers-six-grid': rtSee.uiControls.isExpanded\n && rtSee.rtcPeerConnections.connections?.length\n && rtSee.rtcPeerConnections.connections.length > 4\n && rtSee.rtcPeerConnections.connections.length <= 6,\n 'rtsee-peers-nine-grid': rtSee.uiControls.isExpanded\n && rtSee.rtcPeerConnections.connections?.length\n && rtSee.rtcPeerConnections.connections.length >= 7\n }\">\n @for (peer of rtSee.rtcPeerConnections.connections; track peer.clientId) {\n <div class=\"rtsee-peer-wrapper\"\n [ngClass]=\"{\n 'rtsee-peer-wrapper-minified-hidden': !isPeerVisibleInView(peer),\n 'rtsee-peer-wrapper-active-speaker': peer.isActiveSpeaker && rtSee.uiControls.isExpanded && rtSee.rtcPeerConnections.connections.length > 1\n }\">\n <ngx-rtsee-peer [peer]=\"peer\" [compact]=\"!rtSee.uiControls.isExpanded\"></ngx-rtsee-peer>\n </div>\n }\n </div>\n <div class=\"rtsee-peers-list\"></div>\n <div class=\"rtsee-controls-wrapper\">\n <ngx-rtsee-controls [rtsee]=\"rtSee\" [fullScreenMode]=\"rtSee.uiControls.isExpanded\"></ngx-rtsee-controls>\n </div>\n</div>\n\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: RtseeSettingsComponent, selector: "ngx-rtsee-settings", inputs: ["rtSee", "fullScreenMode"] }, { kind: "component", type: RtseePeerComponent, selector: "ngx-rtsee-peer", inputs: ["peer", "compact"] }, { kind: "component", type: RTSeeControlsComponent, selector: "ngx-rtsee-controls", inputs: ["rtsee", "fullScreenMode"] }] }); }
|
|
460
567
|
}
|
|
461
568
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RTSeeConferenceComponent, decorators: [{
|
|
462
569
|
type: Component,
|
|
@@ -465,8 +572,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
465
572
|
RtseeSettingsComponent,
|
|
466
573
|
RtseePeerComponent,
|
|
467
574
|
RTSeeControlsComponent,
|
|
468
|
-
], standalone: true, template: "<div class=\"rtsee-conference-shell\"
|
|
469
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
575
|
+
], standalone: true, template: "<div class=\"rtsee-conference-shell\"\n (click)=\"onShellClicked($event)\"\n [ngClass]=\"{\n 'rtsee-conference-shell-expanded': rtSee.uiControls.isExpanded,\n 'rtsee-conference-shell-minified': !rtSee.uiControls.isExpanded,\n 'rtsee-conference-shell-no-companions': !rtSee.rtcPeerConnections.connections?.length\n }\">\n @if (rtSee.uiControls.isExpanded) {\n <div class=\"rtsee-fullscreen-header\">\n <span class=\"material-icons-outlined rtsee-fullscreen-header-icon\">videocam</span>\n <span class=\"rtsee-fullscreen-header-title\">{{ callHeaderTitle }}</span>\n </div>\n }\n\n @if (rtSee.localStream && rtSee.camera) {\n <div class=\"rtsee-local-peer\">\n <video #localVideoEl\n class=\"rtsee-local-video\"\n [autoplay]=\"true\"\n [muted]=\"true\"\n [srcObject]=\"rtSee.localStream\"\n playsinline=\"true\"\n ></video>\n </div>\n }\n\n @if (!rtSee.uiControls.isExpanded) {\n <div class=\"rtsee-window-controls\">\n <button type=\"button\"\n (click)=\"expandToFullScreen($event)\"\n title=\"Expand to full screen\"\n aria-label=\"Expand to full screen\"\n class=\"rtsee-window-controls-button rtsee-ripple-button\"\n >\n <span class=\"material-icons-outlined\">open_in_full</span>\n </button>\n </div>\n }\n\n @if (rtSee.settingsOpened) {\n <ngx-rtsee-settings [rtSee]=\"rtSee\" [fullScreenMode]=\"rtSee.uiControls.isExpanded\"></ngx-rtsee-settings>\n }\n\n @if (rtSee.screenSharePeer) {\n <div class=\"rtsee-screen-share\">\n <video #screenShareVideoEl\n [autoplay]=\"true\"\n [muted]=\"true\"\n [srcObject]=\"rtSee.screenSharePeer.remoteVideoStream\"\n playsinline=\"true\"\n class=\"rtsee-screen-share-video\"\n ></video>\n </div>\n }\n\n @if (!rtSee.rtcPeerConnections.connections?.length && !rtSee.camera) {\n <div class=\"rtsee-waiting-placeholder\">\n <span class=\"material-icons-outlined rtsee-waiting-icon\">call</span>\n <span class=\"rtsee-waiting-text\">{{ callHeaderTitle }}</span>\n </div>\n }\n\n <div class=\"rtsee-peers\" [ngClass]=\"{\n 'rtsee-peers-alone': !rtSee.rtcPeerConnections.connections?.length,\n 'rtsee-peers-one': !rtSee.uiControls.isExpanded || rtSee.rtcPeerConnections.connections?.length === 1,\n 'rtsee-peers-two-grid': rtSee.uiControls.isExpanded\n && rtSee.rtcPeerConnections.connections?.length === 2,\n 'rtsee-peers-three-grid': rtSee.uiControls.isExpanded\n && rtSee.rtcPeerConnections.connections?.length\n && rtSee.rtcPeerConnections.connections.length > 2\n && rtSee.rtcPeerConnections.connections.length <= 4,\n 'rtsee-peers-six-grid': rtSee.uiControls.isExpanded\n && rtSee.rtcPeerConnections.connections?.length\n && rtSee.rtcPeerConnections.connections.length > 4\n && rtSee.rtcPeerConnections.connections.length <= 6,\n 'rtsee-peers-nine-grid': rtSee.uiControls.isExpanded\n && rtSee.rtcPeerConnections.connections?.length\n && rtSee.rtcPeerConnections.connections.length >= 7\n }\">\n @for (peer of rtSee.rtcPeerConnections.connections; track peer.clientId) {\n <div class=\"rtsee-peer-wrapper\"\n [ngClass]=\"{\n 'rtsee-peer-wrapper-minified-hidden': !isPeerVisibleInView(peer),\n 'rtsee-peer-wrapper-active-speaker': peer.isActiveSpeaker && rtSee.uiControls.isExpanded && rtSee.rtcPeerConnections.connections.length > 1\n }\">\n <ngx-rtsee-peer [peer]=\"peer\" [compact]=\"!rtSee.uiControls.isExpanded\"></ngx-rtsee-peer>\n </div>\n }\n </div>\n <div class=\"rtsee-peers-list\"></div>\n <div class=\"rtsee-controls-wrapper\">\n <ngx-rtsee-controls [rtsee]=\"rtSee\" [fullScreenMode]=\"rtSee.uiControls.isExpanded\"></ngx-rtsee-controls>\n </div>\n</div>\n\n" }]
|
|
576
|
+
}], ctorParameters: () => [], propDecorators: { localVideoEl: [{
|
|
577
|
+
type: ViewChild,
|
|
578
|
+
args: ['localVideoEl']
|
|
579
|
+
}], screenShareVideoEl: [{
|
|
580
|
+
type: ViewChild,
|
|
581
|
+
args: ['screenShareVideoEl']
|
|
582
|
+
}], rtSee: [{
|
|
470
583
|
type: Input
|
|
471
584
|
}] } });
|
|
472
585
|
|