mirror of https://github.com/OpenVidu/openvidu.git
openvidu-node-client: TokenOptions.record
parent
0ae577ce6e
commit
d493112f12
|
@ -102,11 +102,11 @@ export class Session {
|
|||
|
||||
const data = JSON.stringify({
|
||||
session: this.sessionId,
|
||||
role: (!!tokenOptions && !!tokenOptions.role) ? tokenOptions.role : OpenViduRole.PUBLISHER,
|
||||
data: (!!tokenOptions && !!tokenOptions.data) ? tokenOptions.data : '',
|
||||
kurentoOptions: (!!tokenOptions && !!tokenOptions.kurentoOptions) ? tokenOptions.kurentoOptions : {},
|
||||
role: (!!tokenOptions && !!tokenOptions.role) ? tokenOptions.role : null,
|
||||
data: (!!tokenOptions && !!tokenOptions.data) ? tokenOptions.data : null,
|
||||
record: !!tokenOptions ? tokenOptions.record : null,
|
||||
kurentoOptions: (!!tokenOptions && !!tokenOptions.kurentoOptions) ? tokenOptions.kurentoOptions : null
|
||||
});
|
||||
|
||||
axios.post(
|
||||
this.ov.host + OpenVidu.API_TOKENS,
|
||||
data,
|
||||
|
|
|
@ -22,6 +22,13 @@ import { OpenViduRole } from './OpenViduRole';
|
|||
*/
|
||||
export interface TokenOptions {
|
||||
|
||||
/**
|
||||
* The role assigned to this token
|
||||
*
|
||||
* @default PUBLISHER
|
||||
*/
|
||||
role?: OpenViduRole;
|
||||
|
||||
/**
|
||||
* Secure (server-side) data associated to this token. Every client will receive this data in property `Connection.data`. Object `Connection` can be retrieved by subscribing to event `connectionCreated` of Session object.
|
||||
* - If you have provided no data in your clients when calling method `Session.connect(TOKEN, DATA)` (`DATA` not defined), then `Connection.data` will only have this [[TokenOptions.data]] property.
|
||||
|
@ -31,9 +38,12 @@ export interface TokenOptions {
|
|||
data?: string;
|
||||
|
||||
/**
|
||||
* The role assigned to this token
|
||||
* Whether to record the streams published by the participant owning this token or not. This only affects [INDIVIDUAL recording](/en/stable/advanced-features/recording#selecting-streams-to-be-recorded)
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
role?: OpenViduRole;
|
||||
record?: boolean;
|
||||
|
||||
|
||||
/**
|
||||
* **WARNING**: experimental option. This interface may change in the near future
|
||||
|
|
Loading…
Reference in New Issue