@reactoo/watchtogether-sdk-js 2.7.82 → 2.7.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactoo/watchtogether-sdk-js",
3
- "version": "2.7.82",
3
+ "version": "2.7.83",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "dist/watchtogether-sdk.min.js",
6
6
  "module": "dist/watchtogether-sdk.min.js",
@@ -6,6 +6,10 @@ import {decodeJanusDisplay, generateUUID, maxJitter, median, wait} from "../mode
6
6
 
7
7
  class Room {
8
8
 
9
+ static noop() {
10
+
11
+ }
12
+
9
13
  constructor(debug) {
10
14
  this.debug = debug;
11
15
  this.sessions = [];
@@ -19,10 +23,19 @@ class Room {
19
23
  this.safariVp8 = safariVp8;
20
24
  })
21
25
 
26
+ this._log = Room.noop;
27
+ if (this.debug) {
28
+ this._enableDebug();
29
+ }
30
+
22
31
  // Let's get it started
23
32
  this.whenInitialized = this.initialize();
24
33
  }
25
34
 
35
+ _enableDebug() {
36
+ this._log = console.log.bind(console);
37
+ }
38
+
26
39
  initialize() {
27
40
  return this.safariVp8TestPromise
28
41
  .then(() => this);