mirror of https://github.com/OpenVidu/openvidu.git
openvidu-testapp: make deviceId a proper selector in VideoCaptureOptions
parent
ed2fa45d59
commit
1d91d6fa9d
|
@ -20,9 +20,11 @@
|
|||
<mat-radio-button [value]="'custom'" id="video-capture-custom">Custom</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
<div *ngIf="videoOption === 'custom'">
|
||||
<mat-form-field class="inner-text-input">
|
||||
<mat-form-field id="video-deviceId">
|
||||
<mat-label>deviceId</mat-label>
|
||||
<input matInput id="video-deviceId" placeholder="deviceId" [(ngModel)]="auxVideoCaptureOptions.deviceId"/>
|
||||
<mat-select [(value)]="auxVideoCaptureOptions.deviceId">
|
||||
<mat-option *ngFor="let device of inputVideoDevices" [value]="{ exact: device.deviceId }">{{'[' + device.label + '] ' + device.deviceId}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field id="video-facingMode">
|
||||
<mat-label>facingMode</mat-label>
|
||||
|
|
|
@ -39,6 +39,8 @@ export class OptionsDialogComponent {
|
|||
|
||||
ENUMERATION_SOURCE = Object.keys(Track.Source);
|
||||
|
||||
inputVideoDevices: MediaDeviceInfo[] = [];
|
||||
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<OptionsDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA)
|
||||
|
@ -98,6 +100,9 @@ export class OptionsDialogComponent {
|
|||
if (this.data.allowDisablingScreen === false) {
|
||||
this.allowDisablingScreen = false;
|
||||
}
|
||||
Room.getLocalDevices('videoinput').then((devices) => {
|
||||
this.inputVideoDevices = devices;
|
||||
});
|
||||
}
|
||||
|
||||
returnValues() {
|
||||
|
|
|
@ -111,7 +111,7 @@ export class VideoTrackComponent extends TrackComponent {
|
|||
|
||||
toggleVideoZoom() {
|
||||
this.videoZoom = !this.videoZoom;
|
||||
let newWidth = this.videoZoom ? '720px' : '120px';
|
||||
let newWidth = this.videoZoom ? '1500px' : '120px';
|
||||
this.elementRef.nativeElement.style.width = newWidth;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue