-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openvidu-testapp: complete participant options. Add VideoResolution
- Loading branch information
1 parent
7e7b6d2
commit 888f0bd
Showing
14 changed files
with
421 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 22 additions & 2 deletions
24
openvidu-testapp/src/app/components/dialogs/options-dialog/options-dialog.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125 changes: 66 additions & 59 deletions
125
openvidu-testapp/src/app/components/dialogs/options-dialog/options-dialog.component.html
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...src/app/components/dialogs/options-dialog/video-resolution/video-resolution.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.resolution-div { | ||
border: 1px solid #e0e0e0; | ||
padding: 5px 5px 5px 5px; | ||
border-radius: 5px; | ||
width: fit-content; | ||
margin-top: 8px; | ||
} | ||
|
||
.resolution-title { | ||
margin-top: 2px; | ||
} | ||
|
||
mat-form-field { | ||
font-size: 124x; | ||
width: 100px; | ||
margin-right: 4px; | ||
} |
19 changes: 19 additions & 0 deletions
19
...rc/app/components/dialogs/options-dialog/video-resolution/video-resolution.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div class="resolution-div"> | ||
<p *ngIf="showTitle" class="resolution-title">Resolution</p> | ||
<mat-form-field class="inner-text-input"> | ||
<mat-label>width</mat-label> | ||
<input matInput [id]="componentId+'-width'" type="number" placeholder="width" [(ngModel)]="width" (ngModelChange)="emitChanges()"/> | ||
</mat-form-field> | ||
<mat-form-field class="inner-text-input"> | ||
<mat-label>height</mat-label> | ||
<input matInput [id]="componentId+'-height'" type="number" placeholder="height" [(ngModel)]="height" (ngModelChange)="emitChanges()"/> | ||
</mat-form-field> | ||
<mat-form-field class="inner-text-input"> | ||
<mat-label>frameRate</mat-label> | ||
<input matInput [id]="componentId+'-frameRate'" type="number" placeholder="frameRate" [(ngModel)]="frameRate" (ngModelChange)="emitChanges()"/> | ||
</mat-form-field> | ||
<mat-form-field class="inner-text-input"> | ||
<mat-label>aspectRatio</mat-label> | ||
<input matInput [id]="componentId+'-aspectRatio'" type="number" placeholder="aspectRatio" [(ngModel)]="aspectRatio" (ngModelChange)="emitChanges()"/> | ||
</mat-form-field> | ||
</div> |
21 changes: 21 additions & 0 deletions
21
...app/components/dialogs/options-dialog/video-resolution/video-resolution.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { VideoResolutionComponent } from './video-resolution.component'; | ||
|
||
describe('VideoResolutionComponent', () => { | ||
let component: VideoResolutionComponent; | ||
let fixture: ComponentFixture<VideoResolutionComponent>; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [VideoResolutionComponent] | ||
}); | ||
fixture = TestBed.createComponent(VideoResolutionComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
30 changes: 30 additions & 0 deletions
30
.../src/app/components/dialogs/options-dialog/video-resolution/video-resolution.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Component, EventEmitter, Input, Output } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-video-resolution', | ||
templateUrl: './video-resolution.component.html', | ||
styleUrls: ['./video-resolution.component.css'], | ||
}) | ||
export class VideoResolutionComponent { | ||
@Input() componentId: string; | ||
@Input() showTitle = true; | ||
@Input() width: number; | ||
@Input() height: number; | ||
@Input() frameRate?: number; | ||
@Input() aspectRatio?: number; | ||
@Output() resolutionChanged: EventEmitter<{ | ||
width: number; | ||
height: number; | ||
frameRate?: number; | ||
aspectRatio?: number; | ||
}> = new EventEmitter(); | ||
|
||
emitChanges() { | ||
this.resolutionChanged.emit({ | ||
width: this.width, | ||
height: this.height, | ||
frameRate: this.frameRate, | ||
aspectRatio: this.aspectRatio, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.