You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 25, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+78-1Lines changed: 78 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,6 +163,7 @@ The `opentok-react` library comprises of:
163
163
| apiKey | String | Yes | TokBox API Key
164
164
| sessionId | String | Yes | TokBox Session ID
165
165
| token | String | Yes | TokBox token
166
+
| options | Object | No | TokBox options [options](https://tokbox.com/developer/sdks/js/reference/OT.html#initSession)
166
167
| eventHandlers | Object<Function> | No | Event handlers passed into [session.on](https://tokbox.com/developer/sdks/js/reference/Session.html#on)
167
168
| onConnect | Function() | No | Invoked when [session.connect](https://tokbox.com/developer/sdks/js/reference/Session.html#connect) successfully completes
168
169
| onError | Function(err) | No | Invoked when [session.connect](https://tokbox.com/developer/sdks/js/reference/Session.html#connect) fails
@@ -250,6 +251,41 @@ However, for convenience the `OTPublisher` does watch for changes on a few keys
250
251
251
252
There are plans to support more Publisher properties but for now you will have to call `getPublisher()` to retrieve the Publisher instance and make the necessary changes yourself.
252
253
254
+
You can also get access to the `publisher` object by calling the `getPublisher` method using a [Ref](https://reactjs.org/docs/refs-and-the-dom.html). For example:
@@ -265,6 +301,9 @@ There are plans to support more Publisher properties but for now you will have t
265
301
| session | [Session](https://tokbox.com/developer/sdks/js/reference/Session.html) | No | OpenTok Session instance. This is auto populated by wrapping `OTSubscriber` with `OTStreams`
266
302
| stream | [Stream](https://tokbox.com/developer/sdks/js/reference/Stream.html) | No | OpenTok Stream instance. This is auto populated by wrapping `OTSubscriber` with `OTStreams`
267
303
| properties | Object | No | Properties passed into `session.subscribe`
304
+
| retry | Boolean | No | Set true to retry the subscribe process in case of failure (Default: false)
305
+
| maxRetryAttempts | Number | No | Max retry attempts in case of subscribe failure (Default: 5)
306
+
| retryAttemptTimeout | Number | No | Timeout value between every subscribe retry attempt, expressed in ms (Default: 1000ms)
268
307
| eventHandlers | Object<Function> | No | Event handlers passed into `subscriber.on`
269
308
| onSubscribe | Function() | No | Invoked when `session.subscribe` successfully completes
270
309
| onError | Function(err) | No | Invoked when `session.subscribe` fails
@@ -337,6 +376,44 @@ However, for convenience the `OTSubscriber` does watch for changes on a few keys
337
376
338
377
There are plans to support more Subscriber properties but for now you will have to call `getSubscriber()` to retrieve the Subscriber instance and make the necessary changes yourself.
339
378
379
+
You can also get access to the `subscriber` object by calling the `getSubscriber` method using a Ref. For example:
0 commit comments