openvidu-components: Added stream notification projection

pull/707/head
csantosm 2022-02-07 10:33:49 +01:00
parent 76c51af4ef
commit 51c63fa4c5
2 changed files with 7 additions and 3 deletions

View File

@ -51,8 +51,10 @@
<div class="videoButtons">
<!-- Custom hand notification -->
<ng-content select="[hand-notification]"></ng-content>
<!-- Custom stream notifications -->
<ng-container *ngIf="notificationTemplate">
<ng-container *ngTemplateOutlet="notificationTemplate; context: { stream: _participant }"></ng-container>
</ng-container>
<button mat-icon-button (click)="toggleVideoMenu($event)" matTooltip="Settings" aria-label="Video settings menu">
<mat-icon>more_vert</mat-icon>

View File

@ -1,4 +1,4 @@
import { Component, ElementRef, HostListener, Input, OnInit, ViewChild, ViewContainerRef } from '@angular/core';
import { Component, ContentChild, ElementRef, HostListener, Input, OnInit, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
import { FormControl, Validators } from '@angular/forms';
import { MatMenuPanel, MatMenuTrigger } from '@angular/material/menu';
import { NicknameMatcher } from '../../matchers/nickname.matcher';
@ -22,6 +22,8 @@ import { ParticipantService } from '../../services/participant/participant.servi
styleUrls: ['./stream.component.css']
})
export class StreamComponent implements OnInit {
@ContentChild('notification', { read: TemplateRef }) notificationTemplate: TemplateRef<any>;
videoSizeIconEnum = VideoSizeIcon;
videoTypeEnum = VideoType;
videoSizeIcon: VideoSizeIcon = VideoSizeIcon.BIG;