sample-xmonitor-js 1.0.1 → 1.0.2

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/lib/index.d.ts CHANGED
@@ -41,6 +41,6 @@ export declare function getInstance(options?: {
41
41
  monitors: Array<{
42
42
  provider: DeviceProvider;
43
43
  element: any;
44
- setup?: DefaultSetup | Omit<TxrtcSetup, 'roomId' | 'userId'>;
44
+ setup?: DefaultSetup | TxrtcSetup;
45
45
  }>;
46
46
  }): MonitorFactory;
@@ -12,7 +12,7 @@ export default class TxrtcMonitor extends Monitor {
12
12
  }
13
13
  }
14
14
  async start() {
15
- let streamId = `${this.setup.roomId}_${this.setup.userId}_${this.type.device}`;
15
+ let streamId = `${this.setup.roomId}_${this.setup.userId}`;
16
16
  console.debug(`Start ${this.type.device} TxrtcMonitor with streamId ${streamId}`);
17
17
  if (this.active)
18
18
  return;
@@ -97,8 +97,8 @@ export class TxrtcScreenMonitor extends TxrtcMonitor {
97
97
  super({
98
98
  type: new MonitorType('txrtc', 'screen'), object, element, setup: {
99
99
  ...setup,
100
- userId: object.id,
101
- roomId: object.room
100
+ userId: setup?.userId || object.id,
101
+ roomId: setup?.roomId || object.room
102
102
  }
103
103
  });
104
104
  }
@@ -117,8 +117,8 @@ export class TxrtcCameraMonitor extends TxrtcMonitor {
117
117
  super({
118
118
  type: new MonitorType('txrtc', 'camera'), element, object, setup: {
119
119
  ...setup,
120
- userId: object.id,
121
- roomId: object.room
120
+ userId: setup?.userId || object.id,
121
+ roomId: setup?.roomId || object.room
122
122
  }
123
123
  });
124
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sample-xmonitor-js",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "./lib/index",
6
6
  "files": [