2018-04-18 14:29:07 +02:00
|
|
|
/*
|
2020-02-04 11:25:54 +01:00
|
|
|
* (C) Copyright 2017-2020 OpenVidu (https://openvidu.io)
|
2018-04-18 14:29:07 +02:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-04-23 11:06:16 +02:00
|
|
|
import { OpenViduRole } from './OpenViduRole';
|
2017-06-10 01:44:31 +02:00
|
|
|
|
2018-07-22 22:13:45 +02:00
|
|
|
/**
|
|
|
|
* See [[Session.generateToken]]
|
|
|
|
*/
|
2018-04-23 11:06:16 +02:00
|
|
|
export interface TokenOptions {
|
2018-04-24 15:42:23 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
* - If you have provided some data when calling `Session.connect(TOKEN, DATA)` (`DATA` defined), then `Connection.data` will have the following structure: `"CLIENT_DATA%/%SERVER_DATA"`, being `CLIENT_DATA` the second
|
|
|
|
* parameter passed in OpenVidu Browser in method `Session.connect` and `SERVER_DATA` this [[TokenOptions.data]] property.
|
|
|
|
*/
|
2018-07-09 16:33:47 +02:00
|
|
|
data?: string;
|
2018-04-24 15:42:23 +02:00
|
|
|
|
2018-04-25 11:03:30 +02:00
|
|
|
/**
|
|
|
|
* The role assigned to this token
|
|
|
|
*/
|
2018-07-09 16:33:47 +02:00
|
|
|
role?: OpenViduRole;
|
2018-07-27 11:54:34 +02:00
|
|
|
|
|
|
|
/**
|
2018-08-01 15:10:46 +02:00
|
|
|
* **WARNING**: experimental option. This interface may change in the near future
|
|
|
|
*
|
2018-07-27 11:54:34 +02:00
|
|
|
* 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
|
2020-03-21 23:54:18 +01:00
|
|
|
* the global configuration set in [OpenVidu Server configuration](https://docs.openvidu.io/en/stable/reference-docs/openvidu-server-params/#configuration-parameters-for-openvidu-server)
|
2018-07-27 11:54:34 +02:00
|
|
|
* (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
|
2020-03-21 23:54:18 +01:00
|
|
|
* the global configuration set in [OpenVidu Server configuration](https://docs.openvidu.io/en/stable/reference-docs/openvidu-server-params/#configuration-parameters-for-openvidu-server)
|
2018-07-27 11:54:34 +02:00
|
|
|
* (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
|
2020-03-21 23:54:18 +01:00
|
|
|
* the global configuration set in [OpenVidu Server configuration](https://docs.openvidu.io/en/stable/reference-docs/openvidu-server-params/#configuration-parameters-for-openvidu-server)
|
2018-07-27 11:54:34 +02:00
|
|
|
* (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
|
2020-03-21 23:54:18 +01:00
|
|
|
* the global configuration set in [OpenVidu Server configuration](https://docs.openvidu.io/en/stable/reference-docs/openvidu-server-params/#configuration-parameters-for-openvidu-server)
|
2018-07-27 11:54:34 +02:00
|
|
|
* (parameter `openvidu.streams.video.min-send-bandwidth`) for every outgoing stream of the user owning the token
|
2020-03-21 23:54:18 +01:00
|
|
|
* - `allowedFilters`: names of the filters the user owning the token will be able to apply. See [Voice and video filters](https://docs.openvidu.io/en/stable/advanced-features/filters/)
|
2018-07-27 11:54:34 +02:00
|
|
|
*/
|
|
|
|
kurentoOptions?: {
|
|
|
|
videoMaxRecvBandwidth?: number,
|
|
|
|
videoMinRecvBandwidth?: number,
|
|
|
|
videoMaxSendBandwidth?: number,
|
|
|
|
videoMinSendBandwidth?: number,
|
|
|
|
allowedFilters?: string[]
|
|
|
|
};
|
2018-04-23 11:06:16 +02:00
|
|
|
}
|