openvidu-browser: Session.capabilities interface properties to boolean

pull/88/merge
pabloFuente 2018-07-04 19:10:21 +02:00
parent 05665f1068
commit 150c58429c
2 changed files with 6 additions and 6 deletions

View File

@ -898,8 +898,8 @@ export class Session implements EventDispatcher {
// Initialize capabilities object with the role // Initialize capabilities object with the role
this.capabilities = { this.capabilities = {
subscribe: 1, subscribe: true,
publish: this.openvidu.role !== 'SUBSCRIBER' ? 1 : 0 publish: this.openvidu.role !== 'SUBSCRIBER'
}; };
// Initialize local Connection object with values returned by openvidu-server // Initialize local Connection object with values returned by openvidu-server

View File

@ -21,13 +21,13 @@
export interface Capabilities { export interface Capabilities {
/** /**
* 1 if the client can call [[Session.publish]], 0 if not * `true` if the client can call [[Session.publish]], `false` if not
*/ */
publish: number; publish: boolean;
/** /**
* 1 if the client can call [[Session.subscribe]], 0 if not (1 for every user for now) * `true` if the client can call [[Session.subscribe]], `false` if not (true for every user for now)
*/ */
subscribe: number; subscribe: boolean;
} }