mirror of https://github.com/OpenVidu/openvidu.git
openvidu-testapp: "record" TokenOptions parameter
parent
a146b55803
commit
47f0641909
|
@ -36,4 +36,8 @@ mat-radio-button:first-child {
|
|||
#role-div {
|
||||
padding-top: 6px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
#record-div {
|
||||
padding-bottom: 20px;
|
||||
}
|
|
@ -106,6 +106,10 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<div id="record-div">
|
||||
<mat-checkbox class="checkbox-form" [(ngModel)]="record" id="record-checkbox">Record</mat-checkbox>
|
||||
</div>
|
||||
|
||||
<label class="label">Token</label>
|
||||
<div id="custom-token-div">
|
||||
<mat-form-field>
|
||||
|
@ -119,6 +123,6 @@
|
|||
<mat-dialog-actions>
|
||||
<button id="cancel-btn" mat-button [mat-dialog-close]="undefined">CANCEL</button>
|
||||
<button id="save-btn" mat-button
|
||||
[mat-dialog-close]="{sessionProperties: sessionProperties, turnConf: turnConf, manualTurnConf: manualTurnConf, tokenOptions: generateTokenOptions(), customToken: customToken}">SAVE</button>
|
||||
[mat-dialog-close]="{sessionProperties: sessionProperties, turnConf: turnConf, manualTurnConf: manualTurnConf, tokenOptions: generateTokenOptions(), customToken: customToken, record: record}">SAVE</button>
|
||||
</mat-dialog-actions>
|
||||
</div>
|
||||
|
|
|
@ -15,6 +15,7 @@ export class SessionPropertiesDialogComponent {
|
|||
manualTurnConf: RTCIceServer = { urls: [] };
|
||||
customToken: string;
|
||||
tokenOptions: TokenOptions;
|
||||
record: boolean;
|
||||
|
||||
filterName = 'GStreamerFilter';
|
||||
filters: string[] = [];
|
||||
|
@ -31,6 +32,7 @@ export class SessionPropertiesDialogComponent {
|
|||
this.manualTurnConf = data.manualTurnConf;
|
||||
this.tokenOptions = data.tokenOptions;
|
||||
this.customToken = data.customToken;
|
||||
this.record = data.record;
|
||||
}
|
||||
|
||||
enumToArray(enumerator: any) {
|
||||
|
|
|
@ -127,6 +127,7 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy {
|
|||
turnConf = 'auto';
|
||||
manualTurnConf: RTCIceServer = { urls: [] };
|
||||
customToken: string;
|
||||
record: boolean = true;
|
||||
tokenOptions: TokenOptions = {
|
||||
role: OpenViduRole.PUBLISHER,
|
||||
kurentoOptions: {
|
||||
|
@ -557,7 +558,8 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy {
|
|||
turnConf: this.turnConf,
|
||||
manualTurnConf: this.manualTurnConf,
|
||||
customToken: this.customToken,
|
||||
tokenOptions: this.tokenOptions
|
||||
tokenOptions: this.tokenOptions,
|
||||
record: this.record
|
||||
},
|
||||
width: '450px'
|
||||
});
|
||||
|
@ -572,6 +574,7 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy {
|
|||
this.manualTurnConf = result.manualTurnConf;
|
||||
this.customToken = result.customToken;
|
||||
this.tokenOptions = result.tokenOptions;
|
||||
this.record = result.record;
|
||||
}
|
||||
document.getElementById('session-settings-btn-' + this.index).classList.remove('cdk-program-focused');
|
||||
});
|
||||
|
@ -684,7 +687,7 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy {
|
|||
return this.OV_NodeClient.createSession(this.sessionProperties)
|
||||
.then(session_NodeClient => {
|
||||
this.sessionAPI = session_NodeClient;
|
||||
return session_NodeClient.generateToken({ role: this.tokenOptions.role, kurentoOptions: this.tokenOptions.kurentoOptions });
|
||||
return session_NodeClient.generateToken({ role: this.tokenOptions.role, kurentoOptions: this.tokenOptions.kurentoOptions, record: this.record });
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue