99 lines
5.4 KiB
HTML
99 lines
5.4 KiB
HTML
<div>
|
|
<h2 mat-dialog-title>API REST</h2>
|
|
<mat-dialog-content>
|
|
<label class="label">Sessions</label>
|
|
<div>
|
|
<button mat-button id="get-session-btn" (click)="fetchActiveConnections()">Fetch</button>
|
|
<button mat-button id="list-sessions-btn" (click)="fetchActiveSessions()">Fetch all</button>
|
|
<button mat-button id="close-session-btn" (click)="closeSession()">Close this session</button>
|
|
<mat-divider></mat-divider>
|
|
</div>
|
|
|
|
<label class="label">Connections/Streams</label>
|
|
<mat-form-field class="inner-text-input" [style.fontSize.px]=14>
|
|
<input matInput id="connection-id-field" placeholder="connectionId" [(ngModel)]="connectionId">
|
|
</mat-form-field>
|
|
<mat-form-field class="inner-text-input" [style.fontSize.px]=14>
|
|
<input matInput id="stream-id-field" placeholder="streamId" [(ngModel)]="streamId">
|
|
</mat-form-field>
|
|
<div style="margin-left:9px">
|
|
<mat-checkbox class="checkbox-form" [(ngModel)]="connectionProperties.record" id="record-checkbox">Record
|
|
</mat-checkbox>
|
|
<mat-form-field class="inner-text-input" [style.fontSize.px]=14 style="width:33%">
|
|
<mat-select [(ngModel)]="connectionProperties.role" id="token-role-select">
|
|
<mat-option *ngFor="let enumerator of enumToArray(openviduRoles)" [value]="enumerator">
|
|
<span [attr.id]="'option-' + enumerator">{{ enumerator }}</span>
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<mat-form-field class="inner-text-input" [style.fontSize.px]=14 style="width:40%">
|
|
<input matInput id="connection-data-field" placeholder="data" [(ngModel)]="connectionProperties.data">
|
|
</mat-form-field>
|
|
</div>
|
|
<div>
|
|
<mat-form-field class="inner-text-input" [style.fontSize.px]=14 style="width:33%">
|
|
<mat-label>Custom Ice Servers</mat-label>
|
|
<mat-select [(ngModel)]="numCustomIceServers" id="num-ice-servers-select" (selectionChange)="changedNumIceServers(numCustomIceServers)">
|
|
<mat-option *ngFor="let i of [0,1,2,3,4,5,6,7,8,9,10]" [value]="i">
|
|
<span [attr.id]="'num-ice-servers-' + i">{{ i }}</span>
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<div id="manual-turn-div" *ngFor="let configuredIce of configuredCustomIceServers; let i = index">
|
|
<mat-form-field style="width: 100%">
|
|
<input matInput id="ice-server-url-{{i}}" placeholder="url" type="text" [(ngModel)]="configuredIce.url">
|
|
</mat-form-field>
|
|
<mat-form-field style="width: 48%; padding-right: 2px">
|
|
<input matInput id="ice-server-username-{{i}}" placeholder="username" type="text" [(ngModel)]="configuredIce.username">
|
|
</mat-form-field>
|
|
<mat-form-field style="width: 48%; padding-left: 2px">
|
|
<input matInput id="ice-server-credential-{{i}}" placeholder="credential" type="text" [(ngModel)]="configuredIce.credential">
|
|
</mat-form-field>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<button mat-button id="crate-connection-api-btn" (click)="createConnection()">Create connection</button>
|
|
<button mat-button id="update-connection-api-btn" (click)="updateConnection()" [disabled]="!connectionId">Update
|
|
connection</button>
|
|
<button mat-button id="force-disconnect-api-btn" (click)="forceDisconnect()"
|
|
[disabled]="!connectionId">Disconnect</button>
|
|
<button mat-button id="force-unpublish-api-btn" (click)="forceUnpublish()"
|
|
[disabled]="!streamId">Unpublish</button>
|
|
<mat-divider></mat-divider>
|
|
</div>
|
|
|
|
<label class="label">Recordings</label>
|
|
<div>
|
|
<button mat-button id="list-recording-btn" (click)="listRecordings()">List recordings</button>
|
|
<button mat-button id="start-recording-btn" (click)="startRecording()">Start recording</button>
|
|
<button id="rec-properties-btn" mat-icon-button style="width: 24px; height: 24px; line-height: 24px;"
|
|
title="Recording properties" (click)="toggleRecProperties()">
|
|
<mat-icon style="font-size: 18px; line-height: 18px; width: 18px; height: 18px"
|
|
aria-label="Recording properties">
|
|
{{recPropertiesIcon}}</mat-icon>
|
|
</button>
|
|
<app-recording-properties *ngIf="showRecProperties" [(recordingProperties)]="recordingProperties">
|
|
</app-recording-properties>
|
|
</div>
|
|
<div>
|
|
<mat-form-field class="inner-text-input" [style.fontSize.px]=14>
|
|
<input matInput id="recording-id-field" placeholder="recordingId" [(ngModel)]="recordingId">
|
|
</mat-form-field>
|
|
<button mat-button id="stop-recording-btn" (click)="stopRecording()" [disabled]="!recordingId">Stop
|
|
recording</button>
|
|
<button mat-button id="get-recording-btn" (click)="getRecording()" [disabled]="!recordingId">Get
|
|
recording</button>
|
|
<button mat-button id="delete-recording-btn" (click)="deleteRecording()" [disabled]="!recordingId">Delete
|
|
recording</button>
|
|
</div>
|
|
<mat-form-field id="response-text-area" appearance="fill">
|
|
<textarea id="api-response-text-area" [(ngModel)]="response" matInput readonly></textarea>
|
|
<button mat-button id="clear-response-text-area-btn" (click)="response=''">Clear</button>
|
|
</mat-form-field>
|
|
</mat-dialog-content>
|
|
<mat-dialog-actions>
|
|
<button mat-button id="close-dialog-btn"
|
|
[mat-dialog-close]="{session: session, recordingProperties: recordingProperties}">CLOSE</button>
|
|
</mat-dialog-actions>
|
|
</div>
|