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 {
|
#role-div {
|
||||||
padding-top: 6px;
|
padding-top: 6px;
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#record-div {
|
||||||
|
padding-bottom: 20px;
|
||||||
}
|
}
|
|
@ -106,6 +106,10 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="record-div">
|
||||||
|
<mat-checkbox class="checkbox-form" [(ngModel)]="record" id="record-checkbox">Record</mat-checkbox>
|
||||||
|
</div>
|
||||||
|
|
||||||
<label class="label">Token</label>
|
<label class="label">Token</label>
|
||||||
<div id="custom-token-div">
|
<div id="custom-token-div">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
|
@ -119,6 +123,6 @@
|
||||||
<mat-dialog-actions>
|
<mat-dialog-actions>
|
||||||
<button id="cancel-btn" mat-button [mat-dialog-close]="undefined">CANCEL</button>
|
<button id="cancel-btn" mat-button [mat-dialog-close]="undefined">CANCEL</button>
|
||||||
<button id="save-btn" mat-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>
|
</mat-dialog-actions>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,6 +15,7 @@ export class SessionPropertiesDialogComponent {
|
||||||
manualTurnConf: RTCIceServer = { urls: [] };
|
manualTurnConf: RTCIceServer = { urls: [] };
|
||||||
customToken: string;
|
customToken: string;
|
||||||
tokenOptions: TokenOptions;
|
tokenOptions: TokenOptions;
|
||||||
|
record: boolean;
|
||||||
|
|
||||||
filterName = 'GStreamerFilter';
|
filterName = 'GStreamerFilter';
|
||||||
filters: string[] = [];
|
filters: string[] = [];
|
||||||
|
@ -31,6 +32,7 @@ export class SessionPropertiesDialogComponent {
|
||||||
this.manualTurnConf = data.manualTurnConf;
|
this.manualTurnConf = data.manualTurnConf;
|
||||||
this.tokenOptions = data.tokenOptions;
|
this.tokenOptions = data.tokenOptions;
|
||||||
this.customToken = data.customToken;
|
this.customToken = data.customToken;
|
||||||
|
this.record = data.record;
|
||||||
}
|
}
|
||||||
|
|
||||||
enumToArray(enumerator: any) {
|
enumToArray(enumerator: any) {
|
||||||
|
|
|
@ -127,6 +127,7 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
turnConf = 'auto';
|
turnConf = 'auto';
|
||||||
manualTurnConf: RTCIceServer = { urls: [] };
|
manualTurnConf: RTCIceServer = { urls: [] };
|
||||||
customToken: string;
|
customToken: string;
|
||||||
|
record: boolean = true;
|
||||||
tokenOptions: TokenOptions = {
|
tokenOptions: TokenOptions = {
|
||||||
role: OpenViduRole.PUBLISHER,
|
role: OpenViduRole.PUBLISHER,
|
||||||
kurentoOptions: {
|
kurentoOptions: {
|
||||||
|
@ -557,7 +558,8 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
turnConf: this.turnConf,
|
turnConf: this.turnConf,
|
||||||
manualTurnConf: this.manualTurnConf,
|
manualTurnConf: this.manualTurnConf,
|
||||||
customToken: this.customToken,
|
customToken: this.customToken,
|
||||||
tokenOptions: this.tokenOptions
|
tokenOptions: this.tokenOptions,
|
||||||
|
record: this.record
|
||||||
},
|
},
|
||||||
width: '450px'
|
width: '450px'
|
||||||
});
|
});
|
||||||
|
@ -572,6 +574,7 @@ export class OpenviduInstanceComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
this.manualTurnConf = result.manualTurnConf;
|
this.manualTurnConf = result.manualTurnConf;
|
||||||
this.customToken = result.customToken;
|
this.customToken = result.customToken;
|
||||||
this.tokenOptions = result.tokenOptions;
|
this.tokenOptions = result.tokenOptions;
|
||||||
|
this.record = result.record;
|
||||||
}
|
}
|
||||||
document.getElementById('session-settings-btn-' + this.index).classList.remove('cdk-program-focused');
|
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)
|
return this.OV_NodeClient.createSession(this.sessionProperties)
|
||||||
.then(session_NodeClient => {
|
.then(session_NodeClient => {
|
||||||
this.sessionAPI = 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