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
Copy file name to clipboardExpand all lines: README.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,6 +181,38 @@ obs.send('GetVersion');
181
181
obs.on('SwitchScenes');
182
182
```
183
183
184
+
## Upgrading from 2.x to 3.x
185
+
- The `es5` build is no longer provided. If you're in an environment which must run ES5-compatible code, continue using the latest 2.x release.
186
+
- The Callback API has been separated from the Promise API. If you use callbacks in your `send` invocations, you will need to update them to use the new `sendCallback` method:
187
+
188
+
```js
189
+
// No longer supported!
190
+
obs.send('StartStreaming', (error) => {
191
+
// Code here...
192
+
});
193
+
194
+
// Use this instead:
195
+
obs.sendCallback('StartStreaming', (error) => {
196
+
// Code here...
197
+
});
198
+
```
199
+
200
+
- The `connect` method no longer accepts a callback. Use the promise it returns instead.
0 commit comments