Skip to content

Commit

Permalink
Connection undefined when leaving failed room bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloFuente committed Jun 9, 2017
1 parent 8923d16 commit 1e046f8
Show file tree
Hide file tree
Showing 4 changed files with 848 additions and 440 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,13 @@ Whatever app you are developing, chances are you will need to pass some data for

- **API REST**: when asking for a token to */newToken*, you can pass data as third parameter in the BODY of the POST request
```
{“0”: “sessionId”, “1”: “role”, “2”: "DATA"}
{“session”: “sessionId”, “role”: “role”, “data”: "DATA"}
```

> **openvidu-backend-client** allows you to pass data when creating a Token object: </br>
> `Token t = new TokenOptions.Builder().data("DATA").build();`

The result will be that in all clients *Connection* objects will have in their *data* property the pertinent value you have provided for each user. So, an easy way to get the data associated to any user would be:
The result will be that in all clients, *Connection* objects will have in their *data* property the pertinent value you have provided for each user. So, an easy way to get the data associated to any user would be:

```javascript
session.on('streamCreated', function (event) {
Expand Down
Loading

0 comments on commit 1e046f8

Please sign in to comment.