@100mslive/react-native-hms 1.9.4-beta.0 → 1.9.5
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 +1 -1
- package/android/build.gradle +3 -3
- package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +14 -2
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +21 -4
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +1 -0
- package/android/src/main/java/com/reactnativehmssdk/HmsScreenshareActivity.kt +2 -0
- package/ios/HMSDecoder.swift +41 -13
- package/ios/HMSRNSDK.swift +3 -3
- package/lib/commonjs/classes/HMSBrowserRecordingState.js +2 -0
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +11 -8
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSRecordingState.js +4 -4
- package/lib/commonjs/classes/HMSHLSRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSStreamingState.js +6 -0
- package/lib/commonjs/classes/HMSHLSStreamingState.js.map +1 -1
- package/lib/commonjs/classes/HMSRecordingState.js +17 -0
- package/lib/commonjs/classes/HMSRecordingState.js.map +1 -0
- package/lib/commonjs/classes/HMSRoom.js +0 -1
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRtmpStreamingState.js +2 -2
- package/lib/commonjs/classes/HMSRtmpStreamingState.js.map +1 -1
- package/lib/commonjs/classes/HMSServerRecordingState.js +2 -0
- package/lib/commonjs/classes/HMSServerRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSStreamingState.js +15 -0
- package/lib/commonjs/classes/HMSStreamingState.js.map +1 -0
- package/lib/commonjs/index.js +21 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/emitter/_EventSubscriptionVendor.js +0 -1
- package/lib/commonjs/utils/emitter/_EventSubscriptionVendor.js.map +1 -1
- package/lib/commonjs/utils/keyboard.js +50 -0
- package/lib/commonjs/utils/keyboard.js.map +1 -0
- package/lib/module/classes/HMSBrowserRecordingState.js +2 -0
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +11 -8
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSHLSRecordingState.js +4 -4
- package/lib/module/classes/HMSHLSRecordingState.js.map +1 -1
- package/lib/module/classes/HMSHLSStreamingState.js +6 -0
- package/lib/module/classes/HMSHLSStreamingState.js.map +1 -1
- package/lib/module/classes/HMSRecordingState.js +11 -0
- package/lib/module/classes/HMSRecordingState.js.map +1 -0
- package/lib/module/classes/HMSRoom.js +0 -1
- package/lib/module/classes/HMSRoom.js.map +1 -1
- package/lib/module/classes/HMSRtmpStreamingState.js +2 -2
- package/lib/module/classes/HMSRtmpStreamingState.js.map +1 -1
- package/lib/module/classes/HMSServerRecordingState.js +2 -0
- package/lib/module/classes/HMSServerRecordingState.js.map +1 -1
- package/lib/module/classes/HMSStreamingState.js +9 -0
- package/lib/module/classes/HMSStreamingState.js.map +1 -0
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/emitter/_EventSubscriptionVendor.js +0 -1
- package/lib/module/utils/emitter/_EventSubscriptionVendor.js.map +1 -1
- package/lib/module/utils/keyboard.js +41 -0
- package/lib/module/utils/keyboard.js.map +1 -0
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +3 -0
- package/lib/typescript/classes/HMSHLSRecordingState.d.ts +6 -4
- package/lib/typescript/classes/HMSHLSStreamingState.d.ts +8 -0
- package/lib/typescript/classes/HMSRecordingState.d.ts +9 -0
- package/lib/typescript/classes/HMSRtmpStreamingState.d.ts +3 -2
- package/lib/typescript/classes/HMSServerRecordingState.d.ts +3 -0
- package/lib/typescript/classes/HMSStreamingState.d.ts +7 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/utils/keyboard.d.ts +16 -0
- package/package.json +1 -1
- package/sdk-versions.json +2 -2
- package/src/classes/HMSBrowserRecordingState.ts +4 -0
- package/src/classes/HMSEncoder.ts +8 -3
- package/src/classes/HMSHLSRecordingState.ts +9 -7
- package/src/classes/HMSHLSStreamingState.ts +15 -1
- package/src/classes/HMSRecordingState.ts +9 -0
- package/src/classes/HMSRtmpStreamingState.ts +4 -3
- package/src/classes/HMSServerRecordingState.ts +4 -0
- package/src/classes/HMSStreamingState.ts +7 -0
- package/src/index.ts +4 -1
- package/src/utils/keyboard.ts +37 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import HMSManager from '../modules/HMSManagerModule';
|
|
3
|
+
export let SoftInputModes = /*#__PURE__*/function (SoftInputModes) {
|
|
4
|
+
SoftInputModes[SoftInputModes["SOFT_INPUT_ADJUST_NOTHING"] = 48] = "SOFT_INPUT_ADJUST_NOTHING";
|
|
5
|
+
SoftInputModes[SoftInputModes["SOFT_INPUT_ADJUST_PAN"] = 32] = "SOFT_INPUT_ADJUST_PAN";
|
|
6
|
+
SoftInputModes[SoftInputModes["SOFT_INPUT_ADJUST_RESIZE"] = 16] = "SOFT_INPUT_ADJUST_RESIZE";
|
|
7
|
+
SoftInputModes[SoftInputModes["SOFT_INPUT_ADJUST_UNSPECIFIED"] = 0] = "SOFT_INPUT_ADJUST_UNSPECIFIED";
|
|
8
|
+
return SoftInputModes;
|
|
9
|
+
}({});
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* [Android Only] Sets the `windowSoftInputMode` value for the current activity
|
|
14
|
+
* @param inputMode window softinput moede to use. It can be any variant of the {@link SoftInputModes} enum
|
|
15
|
+
*/
|
|
16
|
+
export function setSoftInputMode(inputMode) {
|
|
17
|
+
if (Platform.OS === 'android') {
|
|
18
|
+
const result = HMSManager.setSoftInputMode(inputMode);
|
|
19
|
+
if (result === -1) {
|
|
20
|
+
throw new Error('Couln\'t get AppContext, Activity or Window!');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* [Android Only] Gets the current `windowSoftInputMode` value of the current activity
|
|
28
|
+
* @returns current `windowSoftInputMode` ({@link SoftInputModes}) value of the current activity
|
|
29
|
+
*/
|
|
30
|
+
export function getSoftInputMode() {
|
|
31
|
+
if (Platform.OS === 'android') {
|
|
32
|
+
const result = HMSManager.getSoftInputMode();
|
|
33
|
+
if (result === -1) {
|
|
34
|
+
throw new Error('Couln\'t get AppContext, Activity or Window!');
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
return SoftInputModes.SOFT_INPUT_ADJUST_UNSPECIFIED;
|
|
39
|
+
}
|
|
40
|
+
;
|
|
41
|
+
//# sourceMappingURL=keyboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","HMSManager","SoftInputModes","setSoftInputMode","inputMode","OS","result","Error","getSoftInputMode","SOFT_INPUT_ADJUST_UNSPECIFIED"],"sources":["keyboard.ts"],"sourcesContent":["import { Platform } from 'react-native';\nimport HMSManager from '../modules/HMSManagerModule';\n\nexport enum SoftInputModes {\n SOFT_INPUT_ADJUST_NOTHING = 48,\n SOFT_INPUT_ADJUST_PAN = 32,\n SOFT_INPUT_ADJUST_RESIZE = 16,\n SOFT_INPUT_ADJUST_UNSPECIFIED = 0,\n};\n\n/**\n * [Android Only] Sets the `windowSoftInputMode` value for the current activity\n * @param inputMode window softinput moede to use. It can be any variant of the {@link SoftInputModes} enum\n */\nexport function setSoftInputMode(inputMode: SoftInputModes) {\n if (Platform.OS === 'android') {\n const result = HMSManager.setSoftInputMode(inputMode);\n if (result === -1) {\n throw new Error('Couln\\'t get AppContext, Activity or Window!');\n }\n }\n};\n\n/**\n * [Android Only] Gets the current `windowSoftInputMode` value of the current activity\n * @returns current `windowSoftInputMode` ({@link SoftInputModes}) value of the current activity\n */\nexport function getSoftInputMode(): SoftInputModes {\n if (Platform.OS === 'android') {\n const result = HMSManager.getSoftInputMode();\n if (result === -1) {\n throw new Error('Couln\\'t get AppContext, Activity or Window!');\n }\n return result;\n }\n return SoftInputModes.SOFT_INPUT_ADJUST_UNSPECIFIED;\n};\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAOC,UAAU,MAAM,6BAA6B;AAEpD,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAKzB;;AAED;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACC,SAAyB,EAAE;EAC1D,IAAIJ,QAAQ,CAACK,EAAE,KAAK,SAAS,EAAE;IAC7B,MAAMC,MAAM,GAAGL,UAAU,CAACE,gBAAgB,CAACC,SAAS,CAAC;IACrD,IAAIE,MAAM,KAAK,CAAC,CAAC,EAAE;MACjB,MAAM,IAAIC,KAAK,CAAC,8CAA8C,CAAC;IACjE;EACF;AACF;AAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAA,EAAmB;EACjD,IAAIR,QAAQ,CAACK,EAAE,KAAK,SAAS,EAAE;IAC7B,MAAMC,MAAM,GAAGL,UAAU,CAACO,gBAAgB,CAAC,CAAC;IAC5C,IAAIF,MAAM,KAAK,CAAC,CAAC,EAAE;MACjB,MAAM,IAAIC,KAAK,CAAC,8CAA8C,CAAC;IACjE;IACA,OAAOD,MAAM;EACf;EACA,OAAOJ,cAAc,CAACO,6BAA6B;AACrD;AAAC"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import type { HMSException } from './HMSException';
|
|
2
|
+
import type { HMSRecordingState } from './HMSRecordingState';
|
|
2
3
|
export declare class HMSBrowserRecordingState {
|
|
3
4
|
initialising: boolean;
|
|
4
5
|
running: boolean;
|
|
5
6
|
error?: HMSException;
|
|
6
7
|
startedAt?: Date;
|
|
7
8
|
stoppedAt?: Date;
|
|
9
|
+
state: HMSRecordingState;
|
|
8
10
|
constructor(params: {
|
|
9
11
|
initialising: boolean;
|
|
10
12
|
running: boolean;
|
|
11
13
|
error?: HMSException;
|
|
12
14
|
startedAt?: Date;
|
|
13
15
|
stoppedAt?: Date;
|
|
16
|
+
state: HMSRecordingState;
|
|
14
17
|
});
|
|
15
18
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import type { HMSException } from './HMSException';
|
|
2
|
+
import type { HMSRecordingState } from './HMSRecordingState';
|
|
1
3
|
export declare class HMSHLSRecordingState {
|
|
2
|
-
singleFilePerLayer: boolean;
|
|
3
|
-
videoOnDemand: boolean;
|
|
4
4
|
running: boolean;
|
|
5
|
+
error?: HMSException;
|
|
5
6
|
startedAt?: Date;
|
|
7
|
+
state: HMSRecordingState;
|
|
6
8
|
constructor(params: {
|
|
7
|
-
singleFilePerLayer: boolean;
|
|
8
|
-
videoOnDemand: boolean;
|
|
9
9
|
running: boolean;
|
|
10
10
|
startedAt?: Date;
|
|
11
|
+
error?: HMSException;
|
|
12
|
+
state: HMSRecordingState;
|
|
11
13
|
});
|
|
12
14
|
}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { HMSHLSVariant } from './HMSHLSVariant';
|
|
2
|
+
import type { HMSException } from './HMSException';
|
|
3
|
+
import type { HMSStreamingState } from './HMSStreamingState';
|
|
2
4
|
export declare class HMSHLSStreamingState {
|
|
3
5
|
running: boolean;
|
|
6
|
+
startedAt?: Date;
|
|
7
|
+
error?: HMSException;
|
|
8
|
+
state: HMSStreamingState;
|
|
4
9
|
variants?: Array<HMSHLSVariant>;
|
|
5
10
|
constructor(params: {
|
|
6
11
|
running: boolean;
|
|
12
|
+
startedAt?: Date;
|
|
13
|
+
error?: HMSException;
|
|
14
|
+
state: HMSStreamingState;
|
|
7
15
|
variants?: Array<HMSHLSVariant>;
|
|
8
16
|
});
|
|
9
17
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { HMSException } from './HMSException';
|
|
2
|
+
import type { HMSStreamingState } from './HMSStreamingState';
|
|
2
3
|
export declare class HMSRtmpStreamingState {
|
|
3
4
|
running: boolean;
|
|
4
5
|
error?: HMSException;
|
|
5
6
|
startedAt?: Date;
|
|
6
|
-
|
|
7
|
+
state: HMSStreamingState;
|
|
7
8
|
constructor(params: {
|
|
8
9
|
running: boolean;
|
|
9
10
|
error?: HMSException;
|
|
10
11
|
startedAt?: Date;
|
|
11
|
-
|
|
12
|
+
state: HMSStreamingState;
|
|
12
13
|
});
|
|
13
14
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { HMSException } from './HMSException';
|
|
2
|
+
import type { HMSRecordingState } from './HMSRecordingState';
|
|
2
3
|
export declare class HMSServerRecordingState {
|
|
3
4
|
running: boolean;
|
|
4
5
|
error?: HMSException;
|
|
5
6
|
startedAt?: Date;
|
|
7
|
+
state: HMSRecordingState;
|
|
6
8
|
constructor(params: {
|
|
7
9
|
running: boolean;
|
|
8
10
|
error?: HMSException;
|
|
9
11
|
startedAt?: Date;
|
|
12
|
+
state: HMSRecordingState;
|
|
10
13
|
});
|
|
11
14
|
}
|
|
@@ -83,6 +83,7 @@ export * from './classes/HMSIOSAudioMode';
|
|
|
83
83
|
export type { HMSSessionStore, HMSSessionStoreValue, } from './classes/HMSSessionStore';
|
|
84
84
|
export type { HmsViewComponent as HMSView, HmsComponentProps as HMSViewProps, } from './classes/HmsView';
|
|
85
85
|
export type { HMSPIPConfig } from './classes/HMSPIPConfig';
|
|
86
|
+
export { HMSRecordingState } from './classes/HMSRecordingState';
|
|
86
87
|
import { HMSSDK as HmsManager } from './classes/HMSSDK';
|
|
87
88
|
export { default as HMSManagerModule } from './modules/HMSManagerModule';
|
|
88
89
|
export * from './components/HMSHLSPlayer';
|
|
@@ -90,6 +91,7 @@ export * from './hooks/useHMSPeerUpdates';
|
|
|
90
91
|
export { useHmsViewsResolutionsState } from './hooks/hmsviews';
|
|
91
92
|
export type { NotificationResult } from './utils/notification';
|
|
92
93
|
export { checkNotifications } from './utils/notification';
|
|
94
|
+
export * from './utils/keyboard';
|
|
93
95
|
export * from './types';
|
|
94
96
|
export * from './stores/types';
|
|
95
97
|
export default HmsManager;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum SoftInputModes {
|
|
2
|
+
SOFT_INPUT_ADJUST_NOTHING = 48,
|
|
3
|
+
SOFT_INPUT_ADJUST_PAN = 32,
|
|
4
|
+
SOFT_INPUT_ADJUST_RESIZE = 16,
|
|
5
|
+
SOFT_INPUT_ADJUST_UNSPECIFIED = 0
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* [Android Only] Sets the `windowSoftInputMode` value for the current activity
|
|
9
|
+
* @param inputMode window softinput moede to use. It can be any variant of the {@link SoftInputModes} enum
|
|
10
|
+
*/
|
|
11
|
+
export declare function setSoftInputMode(inputMode: SoftInputModes): void;
|
|
12
|
+
/**
|
|
13
|
+
* [Android Only] Gets the current `windowSoftInputMode` value of the current activity
|
|
14
|
+
* @returns current `windowSoftInputMode` ({@link SoftInputModes}) value of the current activity
|
|
15
|
+
*/
|
|
16
|
+
export declare function getSoftInputMode(): SoftInputModes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@100mslive/react-native-hms",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.5",
|
|
4
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",
|
package/sdk-versions.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HMSException } from './HMSException';
|
|
2
|
+
import type { HMSRecordingState } from './HMSRecordingState';
|
|
2
3
|
|
|
3
4
|
export class HMSBrowserRecordingState {
|
|
4
5
|
initialising: boolean;
|
|
@@ -6,6 +7,7 @@ export class HMSBrowserRecordingState {
|
|
|
6
7
|
error?: HMSException;
|
|
7
8
|
startedAt?: Date;
|
|
8
9
|
stoppedAt?: Date;
|
|
10
|
+
state: HMSRecordingState;
|
|
9
11
|
|
|
10
12
|
constructor(params: {
|
|
11
13
|
initialising: boolean;
|
|
@@ -13,11 +15,13 @@ export class HMSBrowserRecordingState {
|
|
|
13
15
|
error?: HMSException;
|
|
14
16
|
startedAt?: Date;
|
|
15
17
|
stoppedAt?: Date;
|
|
18
|
+
state: HMSRecordingState;
|
|
16
19
|
}) {
|
|
17
20
|
this.initialising = params.initialising;
|
|
18
21
|
this.running = params.running;
|
|
19
22
|
this.error = params.error;
|
|
20
23
|
this.startedAt = params.startedAt;
|
|
21
24
|
this.stoppedAt = params.stoppedAt;
|
|
25
|
+
this.state = params.state;
|
|
22
26
|
}
|
|
23
27
|
}
|
|
@@ -453,6 +453,7 @@ export class HMSEncoder {
|
|
|
453
453
|
startedAt: HMSEncoder.encodeDate(data?.startedAt),
|
|
454
454
|
stoppedAt: HMSEncoder.encodeDate(data?.stoppedAt),
|
|
455
455
|
error: data?.error || undefined,
|
|
456
|
+
state: data?.state,
|
|
456
457
|
});
|
|
457
458
|
}
|
|
458
459
|
|
|
@@ -461,6 +462,7 @@ export class HMSEncoder {
|
|
|
461
462
|
running: data?.running || false,
|
|
462
463
|
error: data?.error || undefined,
|
|
463
464
|
startedAt: HMSEncoder.encodeDate(data?.startedAt),
|
|
465
|
+
state: data?.state,
|
|
464
466
|
});
|
|
465
467
|
}
|
|
466
468
|
|
|
@@ -468,8 +470,8 @@ export class HMSEncoder {
|
|
|
468
470
|
return new HMSRtmpStreamingState({
|
|
469
471
|
running: data?.running || false,
|
|
470
472
|
startedAt: HMSEncoder.encodeDate(data?.startedAt),
|
|
471
|
-
stoppedAt: HMSEncoder.encodeDate(data?.stoppedAt),
|
|
472
473
|
error: data?.error || undefined,
|
|
474
|
+
state: data?.state,
|
|
473
475
|
});
|
|
474
476
|
}
|
|
475
477
|
|
|
@@ -487,6 +489,9 @@ export class HMSEncoder {
|
|
|
487
489
|
static encodeHLSStreamingState(data: any) {
|
|
488
490
|
return new HMSHLSStreamingState({
|
|
489
491
|
running: data?.running || false,
|
|
492
|
+
startedAt: HMSEncoder.encodeDate(data?.startedAt),
|
|
493
|
+
error: data?.error || undefined,
|
|
494
|
+
state: data?.state,
|
|
490
495
|
variants: Array.isArray(data?.variants)
|
|
491
496
|
? this.encodeHLSVariants(data?.variants)
|
|
492
497
|
: undefined,
|
|
@@ -498,8 +503,8 @@ export class HMSEncoder {
|
|
|
498
503
|
return new HMSHLSRecordingState({
|
|
499
504
|
running: data?.running || false,
|
|
500
505
|
startedAt: HMSEncoder.encodeDate(data?.startedAt),
|
|
501
|
-
|
|
502
|
-
|
|
506
|
+
error: data?.error || undefined,
|
|
507
|
+
state: data?.state,
|
|
503
508
|
});
|
|
504
509
|
} else {
|
|
505
510
|
return undefined;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
+
import type { HMSException } from './HMSException';
|
|
2
|
+
import type { HMSRecordingState } from './HMSRecordingState';
|
|
3
|
+
|
|
1
4
|
export class HMSHLSRecordingState {
|
|
2
|
-
singleFilePerLayer: boolean;
|
|
3
|
-
videoOnDemand: boolean;
|
|
4
5
|
running: boolean;
|
|
6
|
+
error?: HMSException;
|
|
5
7
|
startedAt?: Date;
|
|
6
|
-
|
|
8
|
+
state: HMSRecordingState;
|
|
7
9
|
constructor(params: {
|
|
8
|
-
singleFilePerLayer: boolean;
|
|
9
|
-
videoOnDemand: boolean;
|
|
10
10
|
running: boolean;
|
|
11
11
|
startedAt?: Date;
|
|
12
|
+
error?: HMSException;
|
|
13
|
+
state: HMSRecordingState;
|
|
12
14
|
}) {
|
|
13
|
-
this.singleFilePerLayer = params.singleFilePerLayer;
|
|
14
|
-
this.videoOnDemand = params.videoOnDemand;
|
|
15
15
|
this.running = params.running;
|
|
16
16
|
this.startedAt = params.startedAt;
|
|
17
|
+
this.error = params.error;
|
|
18
|
+
this.state = params.state;
|
|
17
19
|
}
|
|
18
20
|
}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import type { HMSHLSVariant } from './HMSHLSVariant';
|
|
2
|
+
import type { HMSException } from './HMSException';
|
|
3
|
+
import type { HMSStreamingState } from './HMSStreamingState';
|
|
2
4
|
|
|
3
5
|
export class HMSHLSStreamingState {
|
|
4
6
|
running: boolean;
|
|
7
|
+
startedAt?: Date;
|
|
8
|
+
error?: HMSException;
|
|
9
|
+
state: HMSStreamingState;
|
|
5
10
|
variants?: Array<HMSHLSVariant>;
|
|
6
11
|
|
|
7
|
-
constructor(params: {
|
|
12
|
+
constructor(params: {
|
|
13
|
+
running: boolean;
|
|
14
|
+
startedAt?: Date;
|
|
15
|
+
error?: HMSException;
|
|
16
|
+
state: HMSStreamingState;
|
|
17
|
+
variants?: Array<HMSHLSVariant>;
|
|
18
|
+
}) {
|
|
8
19
|
this.running = params.running;
|
|
20
|
+
this.startedAt = params.startedAt;
|
|
21
|
+
this.error = params.error;
|
|
22
|
+
this.state = params.state;
|
|
9
23
|
this.variants = params.variants;
|
|
10
24
|
}
|
|
11
25
|
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import type { HMSException } from './HMSException';
|
|
2
|
+
import type { HMSStreamingState } from './HMSStreamingState';
|
|
2
3
|
|
|
3
4
|
export class HMSRtmpStreamingState {
|
|
4
5
|
running: boolean;
|
|
5
6
|
error?: HMSException;
|
|
6
7
|
startedAt?: Date;
|
|
7
|
-
|
|
8
|
+
state: HMSStreamingState;
|
|
8
9
|
|
|
9
10
|
constructor(params: {
|
|
10
11
|
running: boolean;
|
|
11
12
|
error?: HMSException;
|
|
12
13
|
startedAt?: Date;
|
|
13
|
-
|
|
14
|
+
state: HMSStreamingState;
|
|
14
15
|
}) {
|
|
15
16
|
this.running = params.running;
|
|
16
17
|
this.error = params.error;
|
|
17
18
|
this.startedAt = params.startedAt;
|
|
18
|
-
this.
|
|
19
|
+
this.state = params.state;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import type { HMSException } from './HMSException';
|
|
2
|
+
import type { HMSRecordingState } from './HMSRecordingState';
|
|
2
3
|
|
|
3
4
|
export class HMSServerRecordingState {
|
|
4
5
|
running: boolean;
|
|
5
6
|
error?: HMSException;
|
|
6
7
|
startedAt?: Date;
|
|
8
|
+
state: HMSRecordingState;
|
|
7
9
|
|
|
8
10
|
constructor(params: {
|
|
9
11
|
running: boolean;
|
|
10
12
|
error?: HMSException;
|
|
11
13
|
startedAt?: Date;
|
|
14
|
+
state: HMSRecordingState;
|
|
12
15
|
}) {
|
|
13
16
|
this.running = params.running;
|
|
14
17
|
this.error = params.error;
|
|
15
18
|
this.startedAt = params.startedAt;
|
|
19
|
+
this.state = params.state;
|
|
16
20
|
}
|
|
17
21
|
}
|
package/src/index.ts
CHANGED
|
@@ -89,10 +89,11 @@ export type {
|
|
|
89
89
|
HmsComponentProps as HMSViewProps,
|
|
90
90
|
} from './classes/HmsView';
|
|
91
91
|
export type { HMSPIPConfig } from './classes/HMSPIPConfig';
|
|
92
|
+
export { HMSRecordingState } from './classes/HMSRecordingState';
|
|
92
93
|
|
|
93
94
|
import { HMSSDK as HmsManager } from './classes/HMSSDK';
|
|
94
95
|
|
|
95
|
-
// 100ms React Native
|
|
96
|
+
// 100ms React Native Module
|
|
96
97
|
export { default as HMSManagerModule } from './modules/HMSManagerModule';
|
|
97
98
|
|
|
98
99
|
// 100ms Components
|
|
@@ -106,6 +107,8 @@ export { useHmsViewsResolutionsState } from './hooks/hmsviews';
|
|
|
106
107
|
export type { NotificationResult } from './utils/notification';
|
|
107
108
|
export { checkNotifications } from './utils/notification';
|
|
108
109
|
|
|
110
|
+
export * from './utils/keyboard';
|
|
111
|
+
|
|
109
112
|
// 100ms types
|
|
110
113
|
export * from './types';
|
|
111
114
|
export * from './stores/types';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import HMSManager from '../modules/HMSManagerModule';
|
|
3
|
+
|
|
4
|
+
export enum SoftInputModes {
|
|
5
|
+
SOFT_INPUT_ADJUST_NOTHING = 48,
|
|
6
|
+
SOFT_INPUT_ADJUST_PAN = 32,
|
|
7
|
+
SOFT_INPUT_ADJUST_RESIZE = 16,
|
|
8
|
+
SOFT_INPUT_ADJUST_UNSPECIFIED = 0,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* [Android Only] Sets the `windowSoftInputMode` value for the current activity
|
|
13
|
+
* @param inputMode window softinput moede to use. It can be any variant of the {@link SoftInputModes} enum
|
|
14
|
+
*/
|
|
15
|
+
export function setSoftInputMode(inputMode: SoftInputModes) {
|
|
16
|
+
if (Platform.OS === 'android') {
|
|
17
|
+
const result = HMSManager.setSoftInputMode(inputMode);
|
|
18
|
+
if (result === -1) {
|
|
19
|
+
throw new Error('Couln\'t get AppContext, Activity or Window!');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* [Android Only] Gets the current `windowSoftInputMode` value of the current activity
|
|
26
|
+
* @returns current `windowSoftInputMode` ({@link SoftInputModes}) value of the current activity
|
|
27
|
+
*/
|
|
28
|
+
export function getSoftInputMode(): SoftInputModes {
|
|
29
|
+
if (Platform.OS === 'android') {
|
|
30
|
+
const result = HMSManager.getSoftInputMode();
|
|
31
|
+
if (result === -1) {
|
|
32
|
+
throw new Error('Couln\'t get AppContext, Activity or Window!');
|
|
33
|
+
}
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
return SoftInputModes.SOFT_INPUT_ADJUST_UNSPECIFIED;
|
|
37
|
+
};
|