diff --git a/openvidu-node-client/src/Session.ts b/openvidu-node-client/src/Session.ts index 2b989aaa..9936423a 100644 --- a/openvidu-node-client/src/Session.ts +++ b/openvidu-node-client/src/Session.ts @@ -96,7 +96,8 @@ export class Session { const data = JSON.stringify({ session: this.sessionId, role: (!!tokenOptions && !!tokenOptions.role) ? tokenOptions.role : OpenViduRole.PUBLISHER, - data: (!!tokenOptions && !!tokenOptions.data) ? tokenOptions.data : '' + data: (!!tokenOptions && !!tokenOptions.data) ? tokenOptions.data : '', + kurentoConfiguration: (!!tokenOptions && !!tokenOptions.kurentoOptions) ? tokenOptions.kurentoOptions : {}, }); axios.post( diff --git a/openvidu-node-client/src/TokenOptions.ts b/openvidu-node-client/src/TokenOptions.ts index 65088eb6..b4ed6e27 100644 --- a/openvidu-node-client/src/TokenOptions.ts +++ b/openvidu-node-client/src/TokenOptions.ts @@ -34,4 +34,31 @@ export interface TokenOptions { * The role assigned to this token */ role?: OpenViduRole; + + /** + * Some advanced properties setting the configuration that the WebRTC streams of the user owning the token will have in Kurento Media Server. + * You can adjust: + * - `videoMaxRecvBandwidth`: maximum number of Kbps that the client owning the token will be able to receive from Kurento Media Server. 0 means unconstrained. Giving a value to this property will override + * the global configuration set in [OpenVidu Server configuration](https://openvidu.io/docs/reference-docs/openvidu-server-params/#list-of-configuration-parameters-when-launching-openvidu-server) + * (parameter `openvidu.streams.video.max-recv-bandwidth`) for every incoming stream of the user owning the token. + * _**WARNING**: the lower value set to this property limits every other bandwidth of the WebRTC pipeline this server-to-client stream belongs to. This includes the user publishing the stream and every other user subscribed to the stream_ + * - `videoMinRecvBandwidth`: minimum number of Kbps that the client owning the token will try to receive from Kurento Media Server. 0 means unconstrained. Giving a value to this property will override + * the global configuration set in [OpenVidu Server configuration](https://openvidu.io/docs/reference-docs/openvidu-server-params/#list-of-configuration-parameters-when-launching-openvidu-server) + * (parameter `openvidu.streams.video.min-recv-bandwidth`) for every incoming stream of the user owning the token + * - `videoMaxSendBandwidth`: maximum number of Kbps that the client owning the token will be able to send to Kurento Media Server. 0 means unconstrained. Giving a value to this property will override + * the global configuration set in [OpenVidu Server configuration](https://openvidu.io/docs/reference-docs/openvidu-server-params/#list-of-configuration-parameters-when-launching-openvidu-server) + * (parameter `openvidu.streams.video.max-send-bandwidth`) for every outgoing stream of the user owning the token. + * _**WARNING**: this value limits every other bandwidth of the WebRTC pipeline this client-to-server stream belongs to. This includes every other user subscribed to the stream_ + * - `videoMinSendBandwidth`: minimum number of Kbps that the client owning the token will try to send to Kurento Media Server. 0 means unconstrained. Giving a value to this property will override + * the global configuration set in [OpenVidu Server configuration](https://openvidu.io/docs/reference-docs/openvidu-server-params/#list-of-configuration-parameters-when-launching-openvidu-server) + * (parameter `openvidu.streams.video.min-send-bandwidth`) for every outgoing stream of the user owning the token + * - `allowedFilters`: names of the filters the user owning the token will be able to apply + */ + kurentoOptions?: { + videoMaxRecvBandwidth?: number, + videoMinRecvBandwidth?: number, + videoMaxSendBandwidth?: number, + videoMinSendBandwidth?: number, + allowedFilters?: string[] + }; } \ No newline at end of file