@100mslive/react-native-hms 1.3.0 → 1.4.0
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/README.md +59 -5
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +7 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +38 -0
- package/ios/HMSManager.m +1 -0
- package/ios/HMSManager.swift +7 -0
- package/ios/HMSRNSDK.swift +38 -0
- package/lib/commonjs/classes/HMSAudioTrackSettings.js +1 -1
- package/lib/commonjs/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSException.js +3 -4
- package/lib/commonjs/classes/HMSException.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoTrack.js +5 -6
- package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSMessage.js +1 -2
- package/lib/commonjs/classes/HMSMessage.js.map +1 -1
- package/lib/commonjs/classes/HMSPeer.js +3 -4
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js +0 -1
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +38 -17
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrackSettings.js +1 -1
- package/lib/commonjs/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSAudioTrackSettings.js +1 -1
- package/lib/module/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSException.js +3 -4
- package/lib/module/classes/HMSException.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoTrack.js +5 -6
- package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSMessage.js +1 -2
- package/lib/module/classes/HMSMessage.js.map +1 -1
- package/lib/module/classes/HMSPeer.js +3 -4
- package/lib/module/classes/HMSPeer.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoTrack.js +0 -1
- package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSSDK.js +38 -17
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSVideoTrackSettings.js +1 -1
- package/lib/module/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/typescript/classes/HMSSDK.d.ts +19 -11
- package/package.json +2 -2
- package/sdk-versions.json +2 -2
- package/src/classes/HMSSDK.tsx +45 -19
|
@@ -3,13 +3,13 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
4
|
export class HMSVideoTrackSettings {
|
|
5
5
|
// android only
|
|
6
|
-
// android only
|
|
7
6
|
|
|
8
7
|
constructor(params) {
|
|
9
8
|
_defineProperty(this, "simulcastSettings", void 0);
|
|
10
9
|
_defineProperty(this, "initialState", void 0);
|
|
11
10
|
_defineProperty(this, "cameraFacing", void 0);
|
|
12
11
|
_defineProperty(this, "forceSoftwareDecoder", void 0);
|
|
12
|
+
// android only
|
|
13
13
|
_defineProperty(this, "disableAutoResize", void 0);
|
|
14
14
|
this.simulcastSettings = params.simulcastSettings;
|
|
15
15
|
this.initialState = params.initialState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HMSVideoTrackSettings","constructor","params","_defineProperty","simulcastSettings","initialState","cameraFacing","forceSoftwareDecoder","disableAutoResize"],"sources":["HMSVideoTrackSettings.ts"],"sourcesContent":["import type { HMSSimulcastLayerSettings } from './HMSSimulcastLayerSettings';\nimport type { HMSCameraFacing } from './HMSCameraFacing';\nimport type { HMSTrackSettingsInitState } from './HMSTrackSettingsInitState';\n\nexport class HMSVideoTrackSettings {\n readonly simulcastSettings?: HMSSimulcastLayerSettings[];\n initialState?: HMSTrackSettingsInitState;\n cameraFacing?: HMSCameraFacing;\n forceSoftwareDecoder?: boolean; // android only\n disableAutoResize?: boolean; // android only\n\n constructor(params: {\n simulcastSettings?: HMSSimulcastLayerSettings[];\n initialState?: HMSTrackSettingsInitState;\n cameraFacing?: HMSCameraFacing;\n forceSoftwareDecoder?: boolean;\n disableAutoResize?: boolean;\n }) {\n this.simulcastSettings = params.simulcastSettings;\n this.initialState = params.initialState;\n this.cameraFacing = params.cameraFacing;\n this.forceSoftwareDecoder = params.forceSoftwareDecoder;\n this.disableAutoResize = params.disableAutoResize;\n }\n}\n"],"mappings":";;;AAIA,OAAO,MAAMA,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"names":["HMSVideoTrackSettings","constructor","params","_defineProperty","simulcastSettings","initialState","cameraFacing","forceSoftwareDecoder","disableAutoResize"],"sources":["HMSVideoTrackSettings.ts"],"sourcesContent":["import type { HMSSimulcastLayerSettings } from './HMSSimulcastLayerSettings';\nimport type { HMSCameraFacing } from './HMSCameraFacing';\nimport type { HMSTrackSettingsInitState } from './HMSTrackSettingsInitState';\n\nexport class HMSVideoTrackSettings {\n readonly simulcastSettings?: HMSSimulcastLayerSettings[];\n initialState?: HMSTrackSettingsInitState;\n cameraFacing?: HMSCameraFacing;\n forceSoftwareDecoder?: boolean; // android only\n disableAutoResize?: boolean; // android only\n\n constructor(params: {\n simulcastSettings?: HMSSimulcastLayerSettings[];\n initialState?: HMSTrackSettingsInitState;\n cameraFacing?: HMSCameraFacing;\n forceSoftwareDecoder?: boolean;\n disableAutoResize?: boolean;\n }) {\n this.simulcastSettings = params.simulcastSettings;\n this.initialState = params.initialState;\n this.cameraFacing = params.cameraFacing;\n this.forceSoftwareDecoder = params.forceSoftwareDecoder;\n this.disableAutoResize = params.disableAutoResize;\n }\n}\n"],"mappings":";;;AAIA,OAAO,MAAMA,qBAAqB,CAAC;EAKJ;;EAE7BC,WAAWA,CAACC,MAMX,EAAE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAT6B;IAAAA,eAAA;IAU9B,IAAI,CAACC,iBAAiB,GAAGF,MAAM,CAACE,iBAAiB;IACjD,IAAI,CAACC,YAAY,GAAGH,MAAM,CAACG,YAAY;IACvC,IAAI,CAACC,YAAY,GAAGJ,MAAM,CAACI,YAAY;IACvC,IAAI,CAACC,oBAAoB,GAAGL,MAAM,CAACK,oBAAoB;IACvD,IAAI,CAACC,iBAAiB,GAAGN,MAAM,CAACM,iBAAiB;EACnD;AACF"}
|
|
@@ -83,23 +83,19 @@ export declare class HMSSDK {
|
|
|
83
83
|
logSettings?: HMSLogSettings;
|
|
84
84
|
}): Promise<HMSSDK>;
|
|
85
85
|
/**
|
|
86
|
-
* -
|
|
87
|
-
*
|
|
88
|
-
* @memberof HMSSDK
|
|
89
|
-
*/
|
|
90
|
-
static getLogger(): HMSLogger | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* - Updates the logger for this instance of HMSSDK
|
|
93
|
-
* @param {HMSLogger} hmsLogger
|
|
86
|
+
* - Calls removeListeners that in turn breaks all connections with native listeners.
|
|
87
|
+
*
|
|
94
88
|
* @memberof HMSSDK
|
|
95
89
|
*/
|
|
96
|
-
|
|
90
|
+
destroy: () => Promise<any>;
|
|
97
91
|
/**
|
|
98
|
-
* -
|
|
92
|
+
* - getAuthTokenByRoomCode function is used to get the Auth Token by Room Code
|
|
93
|
+
*
|
|
94
|
+
* checkout {@link https://www.100ms.live/docs/concepts/v2/concepts/rooms/room-codes/room-codes} for more info
|
|
99
95
|
*
|
|
100
96
|
* @memberof HMSSDK
|
|
101
97
|
*/
|
|
102
|
-
|
|
98
|
+
getAuthTokenByRoomCode: (roomCode: string, userId?: string, endpoint?: string) => Promise<string>;
|
|
103
99
|
/**
|
|
104
100
|
* takes an instance of [HMSConfig]{@link HMSConfig} and joins the room.
|
|
105
101
|
* after joining the room user will start receiving the events and updates of the room.
|
|
@@ -600,5 +596,17 @@ export declare class HMSSDK {
|
|
|
600
596
|
isPipModeSupported(): Promise<undefined | boolean>;
|
|
601
597
|
enablePipMode(data?: PIPConfig): Promise<undefined | boolean>;
|
|
602
598
|
setPipParams(data?: PIPConfig): Promise<undefined | boolean>;
|
|
599
|
+
/**
|
|
600
|
+
* - Returns the instance of logger which can be used to manipulate log levels.
|
|
601
|
+
* @returns @instance HMSLogger
|
|
602
|
+
* @memberof HMSSDK
|
|
603
|
+
*/
|
|
604
|
+
static getLogger(): HMSLogger | undefined;
|
|
605
|
+
/**
|
|
606
|
+
* - Updates the logger for this instance of HMSSDK
|
|
607
|
+
* @param {HMSLogger} hmsLogger
|
|
608
|
+
* @memberof HMSSDK
|
|
609
|
+
*/
|
|
610
|
+
setLogger: (hmsLogger?: HMSLogger) => void;
|
|
603
611
|
}
|
|
604
612
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@100mslive/react-native-hms",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "Integrate Real Time Audio and Video conferencing, Interactive Live Streaming, and Chat in your apps with 100ms React Native SDK. With support for HLS and RTMP Live Streaming and Recording, Picture-in-Picture (PiP), one-to-one Video Call Modes, Audio Rooms, Video Player and much more, add immersive real-time communications to your apps.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
7
7
|
"types": "lib/typescript/index.d.ts",
|
package/sdk-versions.json
CHANGED
package/src/classes/HMSSDK.tsx
CHANGED
|
@@ -79,7 +79,6 @@ export class HMSSDK {
|
|
|
79
79
|
id: string;
|
|
80
80
|
private muteStatus: boolean | undefined;
|
|
81
81
|
private appStateSubscription?: any;
|
|
82
|
-
|
|
83
82
|
private onPreviewDelegate?: any;
|
|
84
83
|
private onJoinDelegate?: any;
|
|
85
84
|
private onRoomDelegate?: any;
|
|
@@ -151,24 +150,6 @@ export class HMSSDK {
|
|
|
151
150
|
return HmsSdk;
|
|
152
151
|
}
|
|
153
152
|
|
|
154
|
-
/**
|
|
155
|
-
* - Returns the instance of logger which can be used to manipulate log levels.
|
|
156
|
-
* @returns @instance HMSLogger
|
|
157
|
-
* @memberof HMSSDK
|
|
158
|
-
*/
|
|
159
|
-
static getLogger() {
|
|
160
|
-
return getLogger();
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* - Updates the logger for this instance of HMSSDK
|
|
165
|
-
* @param {HMSLogger} hmsLogger
|
|
166
|
-
* @memberof HMSSDK
|
|
167
|
-
*/
|
|
168
|
-
setLogger = (hmsLogger?: HMSLogger) => {
|
|
169
|
-
setLogger(this.id, hmsLogger);
|
|
170
|
-
};
|
|
171
|
-
|
|
172
153
|
/**
|
|
173
154
|
* - Calls removeListeners that in turn breaks all connections with native listeners.
|
|
174
155
|
*
|
|
@@ -182,6 +163,33 @@ export class HMSSDK {
|
|
|
182
163
|
return await HMSManager.destroy({ id: this.id });
|
|
183
164
|
};
|
|
184
165
|
|
|
166
|
+
/**
|
|
167
|
+
* - getAuthTokenByRoomCode function is used to get the Auth Token by Room Code
|
|
168
|
+
*
|
|
169
|
+
* checkout {@link https://www.100ms.live/docs/concepts/v2/concepts/rooms/room-codes/room-codes} for more info
|
|
170
|
+
*
|
|
171
|
+
* @memberof HMSSDK
|
|
172
|
+
*/
|
|
173
|
+
getAuthTokenByRoomCode = async (
|
|
174
|
+
roomCode: string,
|
|
175
|
+
userId?: string,
|
|
176
|
+
endpoint?: string
|
|
177
|
+
): Promise<string> => {
|
|
178
|
+
logger?.verbose('#Function getAuthTokenByRoomCode', {
|
|
179
|
+
id: this.id,
|
|
180
|
+
roomCode,
|
|
181
|
+
userId,
|
|
182
|
+
endpoint,
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
return HMSManager.getAuthTokenByRoomCode({
|
|
186
|
+
id: this.id,
|
|
187
|
+
roomCode,
|
|
188
|
+
userId,
|
|
189
|
+
endpoint,
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
|
|
185
193
|
/**
|
|
186
194
|
* takes an instance of [HMSConfig]{@link HMSConfig} and joins the room.
|
|
187
195
|
* after joining the room user will start receiving the events and updates of the room.
|
|
@@ -2230,4 +2238,22 @@ export class HMSSDK {
|
|
|
2230
2238
|
id: this.id,
|
|
2231
2239
|
});
|
|
2232
2240
|
}
|
|
2241
|
+
|
|
2242
|
+
/**
|
|
2243
|
+
* - Returns the instance of logger which can be used to manipulate log levels.
|
|
2244
|
+
* @returns @instance HMSLogger
|
|
2245
|
+
* @memberof HMSSDK
|
|
2246
|
+
*/
|
|
2247
|
+
static getLogger() {
|
|
2248
|
+
return getLogger();
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
/**
|
|
2252
|
+
* - Updates the logger for this instance of HMSSDK
|
|
2253
|
+
* @param {HMSLogger} hmsLogger
|
|
2254
|
+
* @memberof HMSSDK
|
|
2255
|
+
*/
|
|
2256
|
+
setLogger = (hmsLogger?: HMSLogger) => {
|
|
2257
|
+
setLogger(this.id, hmsLogger);
|
|
2258
|
+
};
|
|
2233
2259
|
}
|