openvidu-node-client: TokenOptions updated to support filters

pull/87/merge
pabloFuente 2018-07-27 11:54:34 +02:00
parent 56c7d3d1dc
commit 189af702b4
2 changed files with 29 additions and 1 deletions

View File

@ -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(

View File

@ -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[]
};
}