mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Renamed participant item component
parent
cfef092457
commit
301e284d36
|
@ -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();
|
||||
});
|
||||
});
|
|
@ -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 {}
|
||||
}
|
|
@ -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();
|
||||
});
|
||||
});
|
|
@ -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 {}
|
||||
}
|
|
@ -9,18 +9,13 @@
|
|||
<div class="scrollable">
|
||||
|
||||
<div class="local-participant-container">
|
||||
<ov-participant-item
|
||||
<ov-participant-panel-item
|
||||
[name]="localParticipant | nickname"
|
||||
[connections]="localParticipant | streamsEnabled"
|
||||
[showDividerLine]="true"
|
||||
></ov-participant-item>
|
||||
></ov-participant-panel-item>
|
||||
</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">
|
||||
<ov-participant-item
|
||||
*ngFor="let p of remoteParticipants; let lastItem = last"
|
||||
|
|
|
@ -17,13 +17,13 @@ export class ParticipantsPanelComponent implements OnInit {
|
|||
ngOnInit(): void {
|
||||
this.participantService.localParticipantObs.subscribe((p: ParticipantModel) => {
|
||||
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.participantService.remoteParticipantsObs.subscribe((p: ParticipantModel[]) => {
|
||||
this.remoteParticipants = p;
|
||||
// Mark for re-rendering using an impure pipe 'connectionsEnabled'
|
||||
// Mark for re-rendering using an impure pipe 'streamsEnabled'
|
||||
this.cd.markForCheck();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ import { DocumentService } from './services/document/document.service';
|
|||
import { LayoutService } from './services/layout/layout.service';
|
||||
import { SidenavMenuService } from './services/sidenav-menu/sidenav-menu.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 { VideoconferenceComponent } from './components/videoconference/videoconference.component';
|
||||
import { PanelComponent } from './components/panel/panel.component';
|
||||
|
@ -77,7 +77,7 @@ import { AudioWaveComponent } from './components/audio-wave/audio-wave.component
|
|||
ParticipantStreamsPipe,
|
||||
StreamsEnabledPipe,
|
||||
NicknamePipe,
|
||||
ParticipantItemComponent,
|
||||
ParticipantPanelItemComponent,
|
||||
ParticipantsPanelComponent,
|
||||
VideoconferenceComponent,
|
||||
AudioWaveComponent,
|
||||
|
|
Loading…
Reference in New Issue