openvidu-components: Renamed participant item component

pull/707/head
csantosm 2022-02-15 16:30:06 +01:00
parent cfef092457
commit 301e284d36
9 changed files with 47 additions and 52 deletions

View File

@ -1,25 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ParticipantItemComponent } from './participant-item.component';
describe('ParticipantItemComponent', () => {
let component: ParticipantItemComponent;
let fixture: ComponentFixture<ParticipantItemComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ParticipantItemComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ParticipantItemComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,16 +0,0 @@
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'ov-participant-item',
templateUrl: './participant-item.component.html',
styleUrls: ['./participant-item.component.css']
})
export class ParticipantItemComponent implements OnInit {
@Input() name: string;
@Input() connections: string;
@Input() showDividerLine: boolean;
constructor() {}
ngOnInit(): void {}
}

View File

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ParticipantPanelItemComponent } from './participant-panel-item.component';
describe('ParticipantPanelItemComponent', () => {
let component: ParticipantPanelItemComponent;
let fixture: ComponentFixture<ParticipantPanelItemComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ParticipantPanelItemComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ParticipantPanelItemComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,16 @@
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'ov-participant-panel-item',
templateUrl: './participant-panel-item.component.html',
styleUrls: ['./participant-panel-item.component.css']
})
export class ParticipantPanelItemComponent implements OnInit {
@Input() name: string;
@Input() connections: string;
@Input() showDividerLine: boolean;
constructor() {}
ngOnInit(): void {}
}

View File

@ -9,18 +9,13 @@
<div class="scrollable"> <div class="scrollable">
<div class="local-participant-container"> <div class="local-participant-container">
<ov-participant-item <ov-participant-panel-item
[name]="localParticipant | nickname" [name]="localParticipant | nickname"
[connections]="localParticipant | streamsEnabled" [connections]="localParticipant | streamsEnabled"
[showDividerLine]="true" [showDividerLine]="true"
></ov-participant-item> ></ov-participant-panel-item>
</div> </div>
<!-- <div class="message-container">
<p *ngIf="remoteParticipants.length === 0" class="text-info">No remote participants connected</p>
<p *ngIf="remoteParticipants.length > 0" class="text-info">{{ remoteParticipants.length }} remote participants connected</p>
</div> -->
<div class="remote-participants-container" *ngIf="remoteParticipants.length > 0"> <div class="remote-participants-container" *ngIf="remoteParticipants.length > 0">
<ov-participant-item <ov-participant-item
*ngFor="let p of remoteParticipants; let lastItem = last" *ngFor="let p of remoteParticipants; let lastItem = last"

View File

@ -17,13 +17,13 @@ export class ParticipantsPanelComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.participantService.localParticipantObs.subscribe((p: ParticipantModel) => { this.participantService.localParticipantObs.subscribe((p: ParticipantModel) => {
this.localParticipant = p; this.localParticipant = p;
// Mark for re-rendering using an impure pipe 'connectionsEnabled' // Mark for re-rendering using an impure pipe 'streamsEnabled'
this.cd.markForCheck(); this.cd.markForCheck();
}); });
this.participantService.remoteParticipantsObs.subscribe((p: ParticipantModel[]) => { this.participantService.remoteParticipantsObs.subscribe((p: ParticipantModel[]) => {
this.remoteParticipants = p; this.remoteParticipants = p;
// Mark for re-rendering using an impure pipe 'connectionsEnabled' // Mark for re-rendering using an impure pipe 'streamsEnabled'
this.cd.markForCheck(); this.cd.markForCheck();
}); });
} }

View File

@ -54,7 +54,7 @@ import { DocumentService } from './services/document/document.service';
import { LayoutService } from './services/layout/layout.service'; import { LayoutService } from './services/layout/layout.service';
import { SidenavMenuService } from './services/sidenav-menu/sidenav-menu.service'; import { SidenavMenuService } from './services/sidenav-menu/sidenav-menu.service';
import { ParticipantService } from './services/participant/participant.service'; import { ParticipantService } from './services/participant/participant.service';
import { ParticipantItemComponent } from './components/panel/participants-panel/participant-item/participant-item.component'; import { ParticipantPanelItemComponent } from './components/panel/participants-panel/participant-panel-item/participant-panel-item.component';
import { ParticipantsPanelComponent } from './components/panel/participants-panel/participants-panel/participants-panel.component'; import { ParticipantsPanelComponent } from './components/panel/participants-panel/participants-panel/participants-panel.component';
import { VideoconferenceComponent } from './components/videoconference/videoconference.component'; import { VideoconferenceComponent } from './components/videoconference/videoconference.component';
import { PanelComponent } from './components/panel/panel.component'; import { PanelComponent } from './components/panel/panel.component';
@ -77,7 +77,7 @@ import { AudioWaveComponent } from './components/audio-wave/audio-wave.component
ParticipantStreamsPipe, ParticipantStreamsPipe,
StreamsEnabledPipe, StreamsEnabledPipe,
NicknamePipe, NicknamePipe,
ParticipantItemComponent, ParticipantPanelItemComponent,
ParticipantsPanelComponent, ParticipantsPanelComponent,
VideoconferenceComponent, VideoconferenceComponent,
AudioWaveComponent, AudioWaveComponent,