sample-xmonitor-js 1.0.0 → 1.0.1

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/Monitor.d.ts CHANGED
@@ -34,9 +34,9 @@ export declare class ScreenTypeError extends Error {
34
34
  readonly code: string;
35
35
  constructor(message: any, code?: any);
36
36
  }
37
- export type Device = 'screen' | 'camera';
37
+ export type Device = 'screen' | 'camera' | 'mobile';
38
38
  export type Provider = 'default' | 'txrtc';
39
- export type DeviceProvider = 'default:screen' | 'default:camera' | 'txrtc:screen' | 'txrtc:camera';
39
+ export type DeviceProvider = 'default:screen' | 'default:camera' | 'default:mobile' | 'txrtc:screen' | 'txrtc:camera' | 'txrtc:mobile';
40
40
  export declare class MonitorType {
41
41
  readonly provider: Provider;
42
42
  readonly device: Device;
@@ -102,7 +102,7 @@ export default class DefaultMonitor extends Monitor {
102
102
  if (device === 'screen') {
103
103
  return new DefaultScreenMonitor(object, element, setup);
104
104
  }
105
- else if (device === 'camera') {
105
+ else if (device === 'camera' || device === 'mobile') {
106
106
  return new DefaultCameraMonitor(object, element, setup);
107
107
  }
108
108
  throw new NotSupportError(`Device ${device} not support`, 'NotSupportError');
@@ -86,7 +86,7 @@ export default class TxrtcMonitor extends Monitor {
86
86
  if (device === 'screen') {
87
87
  return new TxrtcScreenMonitor(object, element, setup);
88
88
  }
89
- else if (device === 'camera') {
89
+ else if (device === 'camera' || device === 'mobile') {
90
90
  return new TxrtcCameraMonitor(object, element, setup);
91
91
  }
92
92
  throw new NotSupportError(`Device ${device} not support`, 'NotSupportError');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sample-xmonitor-js",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "",
5
5
  "main": "./lib/index",
6
6
  "files": [