@100mslive/react-native-hms 1.7.0 → 1.7.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/README.md +30 -39
- package/android/.gradle/6.7.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.7.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.7.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.7.1/gc.properties +0 -0
- package/android/.gradle/6.9/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +16 -9
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradlew +103 -104
- package/android/gradlew.bat +3 -18
- package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +27 -3
- package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +2 -1
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +7 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +39 -10
- package/ios/HMSDecoder.swift +4 -3
- package/ios/HMSHelper.swift +6 -2
- package/ios/HMSManager.m +4 -0
- package/ios/HMSManager.swift +8 -0
- package/ios/HMSRNSDK.swift +54 -24
- package/lib/commonjs/classes/HMSAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSBrowserRecordingState.js +2 -0
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSCameraControl.js +3 -5
- package/lib/commonjs/classes/HMSCameraControl.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +33 -34
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSEventEmitter.js +10 -0
- package/lib/commonjs/classes/HMSEventEmitter.js.map +1 -0
- package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSManagerModule.js +18 -0
- package/lib/commonjs/classes/HMSManagerModule.js.map +1 -0
- package/lib/commonjs/classes/HMSNativeEventEmitter.js.map +1 -1
- package/lib/commonjs/classes/HMSNativeEventListener.js +13 -0
- package/lib/commonjs/classes/HMSNativeEventListener.js.map +1 -0
- package/lib/commonjs/classes/HMSPeersCache.js +3 -5
- package/lib/commonjs/classes/HMSPeersCache.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRoomCache.js +10 -5
- package/lib/commonjs/classes/HMSRoomCache.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +79 -84
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSSessionStore.js +6 -7
- package/lib/commonjs/classes/HMSSessionStore.js.map +1 -1
- package/lib/commonjs/classes/HMSTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +4 -1
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js +8 -8
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/hooks.js.map +1 -1
- package/lib/commonjs/hooks/useHMSPeerUpdates.js +77 -0
- package/lib/commonjs/hooks/useHMSPeerUpdates.js.map +1 -0
- package/lib/commonjs/index.js +25 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/classes/HMSAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSBrowserRecordingState.js +2 -0
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/module/classes/HMSCameraControl.js +1 -4
- package/lib/module/classes/HMSCameraControl.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +31 -33
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSEventEmitter.js +3 -0
- package/lib/module/classes/HMSEventEmitter.js.map +1 -0
- package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSLocalPeer.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSManagerModule.js +11 -0
- package/lib/module/classes/HMSManagerModule.js.map +1 -0
- package/lib/module/classes/HMSNativeEventEmitter.js.map +1 -1
- package/lib/module/classes/HMSNativeEventListener.js +5 -0
- package/lib/module/classes/HMSNativeEventListener.js.map +1 -0
- package/lib/module/classes/HMSPeersCache.js +1 -4
- package/lib/module/classes/HMSPeersCache.js.map +1 -1
- package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSRemotePeer.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSRoom.js.map +1 -1
- package/lib/module/classes/HMSRoomCache.js +8 -4
- package/lib/module/classes/HMSRoomCache.js.map +1 -1
- package/lib/module/classes/HMSSDK.js +27 -32
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSSessionStore.js +2 -4
- package/lib/module/classes/HMSSessionStore.js.map +1 -1
- package/lib/module/classes/HMSTrack.js.map +1 -1
- package/lib/module/classes/HMSVideoTrack.js.map +1 -1
- package/lib/module/classes/HmsView.js +4 -1
- package/lib/module/classes/HmsView.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js +8 -8
- package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/hooks.js.map +1 -1
- package/lib/module/hooks/useHMSPeerUpdates.js +67 -0
- package/lib/module/hooks/useHMSPeerUpdates.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/classes/HMSAudioTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +2 -0
- package/lib/typescript/classes/HMSEventEmitter.d.ts +2 -0
- package/lib/typescript/classes/HMSLocalAudioTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSLocalPeer.d.ts +3 -2
- package/lib/typescript/classes/HMSLocalVideoTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSManagerModule.d.ts +3 -0
- package/lib/typescript/classes/HMSNativeEventListener.d.ts +4 -0
- package/lib/typescript/classes/HMSRemoteAudioTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSRemotePeer.d.ts +3 -2
- package/lib/typescript/classes/HMSRemoteVideoTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSRoom.d.ts +1 -1
- package/lib/typescript/classes/HMSSDK.d.ts +2 -1
- package/lib/typescript/classes/HMSTrack.d.ts +3 -2
- package/lib/typescript/classes/HMSVideoTrack.d.ts +2 -1
- package/lib/typescript/classes/HmsView.d.ts +1 -1
- package/lib/typescript/components/HMSHLSPlayer/RCTHMSHLSPlayer.d.ts +1 -1
- package/lib/typescript/components/HMSHLSPlayer/hooks.d.ts +1 -1
- package/lib/typescript/hooks/useHMSPeerUpdates.d.ts +7 -0
- package/lib/typescript/index.d.ts +2 -0
- package/package.json +1 -1
- package/sdk-versions.json +2 -2
- package/src/classes/HMSAudioTrack.ts +2 -1
- package/src/classes/HMSBrowserRecordingState.ts +3 -0
- package/src/classes/HMSCameraControl.ts +1 -2
- package/src/classes/HMSEncoder.ts +4 -5
- package/src/classes/HMSEventEmitter.ts +3 -0
- package/src/classes/HMSLocalAudioTrack.ts +2 -1
- package/src/classes/HMSLocalPeer.ts +3 -2
- package/src/classes/HMSLocalVideoTrack.ts +2 -1
- package/src/classes/HMSManagerModule.ts +18 -0
- package/src/classes/HMSNativeEventEmitter.ts +2 -1
- package/src/classes/HMSNativeEventListener.ts +8 -0
- package/src/classes/HMSPeersCache.ts +2 -3
- package/src/classes/HMSRemoteAudioTrack.ts +2 -1
- package/src/classes/HMSRemotePeer.ts +3 -2
- package/src/classes/HMSRemoteVideoTrack.ts +2 -1
- package/src/classes/HMSRoom.ts +1 -1
- package/src/classes/HMSRoomCache.ts +11 -3
- package/src/classes/HMSSDK.tsx +41 -43
- package/src/classes/HMSSessionStore.ts +6 -8
- package/src/classes/HMSTrack.ts +3 -2
- package/src/classes/HMSVideoTrack.ts +2 -1
- package/src/classes/HmsView.tsx +8 -2
- package/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx +36 -10
- package/src/components/HMSHLSPlayer/RCTHMSHLSPlayer.ts +2 -3
- package/src/components/HMSHLSPlayer/hooks.ts +3 -2
- package/src/hooks/useHMSPeerUpdates.ts +85 -0
- package/src/index.ts +6 -0
- package/android/local.properties +0 -8
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcuserdata/yogesh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Hmssdk.xcodeproj/xcuserdata/yogesh.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
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
|
-
import
|
|
4
|
+
import HMSManager from './HMSManagerModule';
|
|
5
5
|
import { HMSEncoder } from './HMSEncoder';
|
|
6
6
|
import { HMSRoomUpdate } from './HMSRoomUpdate';
|
|
7
|
-
const {
|
|
8
|
-
HMSManager
|
|
9
|
-
} = NativeModules;
|
|
10
7
|
export let hmsRoomCache;
|
|
11
8
|
export const getHmsRoomCache = () => hmsRoomCache;
|
|
12
9
|
export const setHmsRoomCache = _hmsRoomCache => {
|
|
@@ -65,6 +62,11 @@ export class HMSRoomCache {
|
|
|
65
62
|
this._data.set('hlsRecordingState', HMSEncoder.encodeHLSRecordingState(data.hlsRecordingState));
|
|
66
63
|
break;
|
|
67
64
|
}
|
|
65
|
+
case HMSRoomUpdate.ROOM_PEER_COUNT_UPDATED:
|
|
66
|
+
{
|
|
67
|
+
this._data.set('peerCount', encodeHMSRoomProperty(this.id, 'peerCount', data));
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
68
70
|
default:
|
|
69
71
|
{
|
|
70
72
|
for (const key in data) {
|
|
@@ -107,6 +109,8 @@ function encodeHMSRoomProperty(id, property, data) {
|
|
|
107
109
|
value = HMSEncoder.encodeHLSRecordingState(data.hlsRecordingState);
|
|
108
110
|
} else if (property === 'localPeer') {
|
|
109
111
|
value = HMSEncoder.encodeHmsLocalPeer(data.localPeer, id);
|
|
112
|
+
} else if (property === 'peerCount') {
|
|
113
|
+
value = typeof data[property] === 'number' ? data[property] : null;
|
|
110
114
|
} else {
|
|
111
115
|
value = data[property];
|
|
112
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["HMSManager","HMSEncoder","HMSRoomUpdate","hmsRoomCache","getHmsRoomCache","setHmsRoomCache","_hmsRoomCache","clearHmsRoomCache","cleanup","undefined","HMSRoomCache","constructor","id","_defineProperty","Map","getProperty","property","value","_data","get","encodedValue","getHMSRoomPropertyFromNative","set","updateRoomCache","data","updateType","ROOM_MUTED","ROOM_UNMUTED","SERVER_RECORDING_STATE_UPDATED","encodeServerRecordingState","serverRecordingState","RTMP_STREAMING_STATE_UPDATED","encodeRTMPStreamingState","rtmpHMSRtmpStreamingState","BROWSER_RECORDING_STATE_UPDATED","encodeBrowserRecordingState","browserRecordingState","HLS_STREAMING_STATE_UPDATED","encodeHLSStreamingState","hlsStreamingState","HLS_RECORDING_STATE_UPDATED","encodeHLSRecordingState","hlsRecordingState","ROOM_PEER_COUNT_UPDATED","encodeHMSRoomProperty","key","Object","prototype","hasOwnProperty","call","clear","getRoomProperty","encodeHmsPeers","peers","encodeHmsLocalPeer","localPeer"],"sources":["HMSRoomCache.ts"],"sourcesContent":["import HMSManager from './HMSManagerModule';\n\nimport type { HMSRoom } from './HMSRoom';\nimport { HMSEncoder } from './HMSEncoder';\nimport { HMSRoomUpdate } from './HMSRoomUpdate';\n\nexport let hmsRoomCache: HMSRoomCache | undefined;\n\nexport const getHmsRoomCache = () => hmsRoomCache;\n\nexport const setHmsRoomCache = (_hmsRoomCache: HMSRoomCache) => {\n hmsRoomCache = _hmsRoomCache;\n};\n\nexport const clearHmsRoomCache = () => {\n if (hmsRoomCache) {\n hmsRoomCache.cleanup();\n }\n hmsRoomCache = undefined;\n};\n\nexport type HMSRoomCacheProps = Partial<Omit<HMSRoom, 'id'>>;\n\nexport class HMSRoomCache {\n private _data = new Map<\n keyof HMSRoomCacheProps,\n HMSRoomCacheProps[keyof HMSRoomCacheProps]\n >();\n private id: string;\n\n constructor(id: string) {\n this.id = id;\n }\n\n getProperty<T extends keyof Required<HMSRoomCacheProps>>(\n property: T\n ): Required<HMSRoomCacheProps>[T] {\n const value: any = this._data.get(property);\n\n if (value) {\n return value;\n }\n\n const encodedValue = getHMSRoomPropertyFromNative(this.id, property);\n\n this._data.set(property, encodedValue);\n\n return encodedValue;\n }\n\n updateRoomCache(\n data: Record<keyof HMSRoomCacheProps, any>,\n updateType?: HMSRoomUpdate\n ) {\n switch (updateType) {\n case HMSRoomUpdate.ROOM_MUTED:\n case HMSRoomUpdate.ROOM_UNMUTED: {\n break;\n }\n case HMSRoomUpdate.SERVER_RECORDING_STATE_UPDATED: {\n this._data.set(\n 'serverRecordingState',\n HMSEncoder.encodeServerRecordingState(data.serverRecordingState)\n );\n break;\n }\n case HMSRoomUpdate.RTMP_STREAMING_STATE_UPDATED: {\n this._data.set(\n 'rtmpHMSRtmpStreamingState',\n HMSEncoder.encodeRTMPStreamingState(data.rtmpHMSRtmpStreamingState)\n );\n break;\n }\n case HMSRoomUpdate.BROWSER_RECORDING_STATE_UPDATED: {\n this._data.set(\n 'browserRecordingState',\n HMSEncoder.encodeBrowserRecordingState(data.browserRecordingState)\n );\n break;\n }\n case HMSRoomUpdate.HLS_STREAMING_STATE_UPDATED: {\n this._data.set(\n 'hlsStreamingState',\n HMSEncoder.encodeHLSStreamingState(data.hlsStreamingState)\n );\n break;\n }\n case HMSRoomUpdate.HLS_RECORDING_STATE_UPDATED: {\n this._data.set(\n 'hlsRecordingState',\n HMSEncoder.encodeHLSRecordingState(data.hlsRecordingState)\n );\n break;\n }\n case HMSRoomUpdate.ROOM_PEER_COUNT_UPDATED: {\n this._data.set(\n 'peerCount',\n encodeHMSRoomProperty(this.id, 'peerCount', data)\n );\n break;\n }\n default: {\n for (const key in data) {\n const property = key as keyof HMSRoomCacheProps;\n\n if (Object.prototype.hasOwnProperty.call(data, property)) {\n const value = encodeHMSRoomProperty(this.id, property, data);\n this._data.set(property, value);\n }\n }\n break;\n }\n }\n }\n\n cleanup() {\n this._data.clear();\n }\n}\n\nexport function getHMSRoomPropertyFromNative<T extends keyof HMSRoomCacheProps>(\n id: string,\n property: T\n): Required<HMSRoomCacheProps>[T] {\n const data: any = HMSManager.getRoomProperty({\n id,\n property,\n });\n\n if (!data) return data;\n\n const value = encodeHMSRoomProperty(id, property, data);\n\n return value;\n}\n\nfunction encodeHMSRoomProperty<T extends keyof HMSRoomCacheProps>(\n id: string,\n property: T,\n data: Record<string, any>\n): Required<HMSRoomCacheProps>[T] {\n let value;\n\n if (property === 'peers') {\n value = HMSEncoder.encodeHmsPeers(data.peers);\n } else if (property === 'browserRecordingState') {\n value = HMSEncoder.encodeBrowserRecordingState(data.browserRecordingState);\n } else if (property === 'rtmpHMSRtmpStreamingState') {\n value = HMSEncoder.encodeRTMPStreamingState(data.rtmpHMSRtmpStreamingState);\n } else if (property === 'serverRecordingState') {\n value = HMSEncoder.encodeServerRecordingState(data.serverRecordingState);\n } else if (property === 'hlsStreamingState') {\n value = HMSEncoder.encodeHLSStreamingState(data.hlsStreamingState);\n } else if (property === 'hlsRecordingState') {\n value = HMSEncoder.encodeHLSRecordingState(data.hlsRecordingState);\n } else if (property === 'localPeer') {\n value = HMSEncoder.encodeHmsLocalPeer(data.localPeer, id);\n } else if (property === 'peerCount') {\n value = typeof data[property] === 'number' ? data[property] : null;\n } else {\n value = data[property];\n }\n\n return value;\n}\n"],"mappings":";;;AAAA,OAAOA,UAAU,MAAM,oBAAoB;AAG3C,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,aAAa,QAAQ,iBAAiB;AAE/C,OAA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EAAE;IACnCC,KAAK,GAAGhB,UAAU,CAACqD,kBAAkB,CAAC9B,IAAI,CAAC+B,SAAS,EAAE3C,EAAE,CAAC;EAC3D,CAAC,MAAM,IAAII,QAAQ,KAAK,WAAW,EAAE;IACnCC,KAAK,GAAG,OAAOO,IAAI,CAACR,QAAQ,CAAC,KAAK,QAAQ,GAAGQ,IAAI,CAACR,QAAQ,CAAC,GAAG,IAAI;EACpE,CAAC,MAAM;IACLC,KAAK,GAAGO,IAAI,CAACR,QAAQ,CAAC;EACxB;EAEA,OAAOC,KAAK;AACd"}
|
|
@@ -2,16 +2,17 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
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
|
import React from 'react';
|
|
5
|
-
import { AppState,
|
|
5
|
+
import { AppState, Platform } from 'react-native';
|
|
6
6
|
import { HMSEncoder } from './HMSEncoder';
|
|
7
7
|
import { HMSHelper } from './HMSHelper';
|
|
8
8
|
import { getLogger, logger, setLogger } from './HMSLogger';
|
|
9
9
|
import { HMSTrackType } from './HMSTrackType';
|
|
10
10
|
import { HMSUpdateListenerActions } from './HMSUpdateListenerActions';
|
|
11
11
|
import { HmsViewComponent } from './HmsView';
|
|
12
|
+
import HMSManager from './HMSManagerModule';
|
|
12
13
|
import { HMSMessageType } from './HMSMessageType';
|
|
13
14
|
import { HMSPIPListenerActions } from './HMSPIPListenerActions';
|
|
14
|
-
import
|
|
15
|
+
import HMSNativeEventListener from './HMSNativeEventListener';
|
|
15
16
|
import { clearHmsPeersCache, getHmsPeersCache, HMSPeersCache, setHmsPeersCache } from './HMSPeersCache';
|
|
16
17
|
import { clearHmsRoomCache, getHmsRoomCache, HMSRoomCache, setHmsRoomCache } from './HMSRoomCache';
|
|
17
18
|
import { HMSPeerUpdateOrdinals } from './HMSPeerUpdate';
|
|
@@ -19,14 +20,7 @@ import { HMSSessionStore } from './HMSSessionStore';
|
|
|
19
20
|
|
|
20
21
|
// TODO: Rename to HMSPIPConfig & to be moved to a separate file
|
|
21
22
|
|
|
22
|
-
const {
|
|
23
|
-
/**
|
|
24
|
-
* @ignore
|
|
25
|
-
*/
|
|
26
|
-
HMSManager
|
|
27
|
-
} = NativeModules;
|
|
28
23
|
const ReactNativeVersion = require('react-native/Libraries/Core/ReactNativeVersion');
|
|
29
|
-
const HmsEventEmitter = new HMSNativeEventEmitter(HMSManager);
|
|
30
24
|
let HmsSdk;
|
|
31
25
|
export class HMSSDK {
|
|
32
26
|
constructor(id) {
|
|
@@ -195,7 +189,7 @@ export class HMSSDK {
|
|
|
195
189
|
_defineProperty(this, "roomLeaveCleanup", () => {
|
|
196
190
|
var _this$appStateSubscri;
|
|
197
191
|
this.muteStatus = undefined;
|
|
198
|
-
this === null || this === void 0
|
|
192
|
+
this === null || this === void 0 || (_this$appStateSubscri = this.appStateSubscription) === null || _this$appStateSubscri === void 0 ? void 0 : _this$appStateSubscri.remove();
|
|
199
193
|
clearHmsPeersCache();
|
|
200
194
|
clearHmsRoomCache();
|
|
201
195
|
HMSEncoder.clearData(); // Clearing cached data in encoder
|
|
@@ -1076,7 +1070,7 @@ export class HMSSDK {
|
|
|
1076
1070
|
// Checking if we already have ON_PREVIEW subscription
|
|
1077
1071
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_PREVIEW]) {
|
|
1078
1072
|
// Adding ON_PREVIEW native listener
|
|
1079
|
-
const previewSubscription =
|
|
1073
|
+
const previewSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_PREVIEW, this.onPreviewListener);
|
|
1080
1074
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_PREVIEW] = previewSubscription;
|
|
1081
1075
|
}
|
|
1082
1076
|
// Adding App Delegate listener
|
|
@@ -1088,7 +1082,7 @@ export class HMSSDK {
|
|
|
1088
1082
|
// Checking if we already have ON_JOIN subscription
|
|
1089
1083
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_JOIN]) {
|
|
1090
1084
|
// Adding ON_JOIN native listener
|
|
1091
|
-
const joinSubscription =
|
|
1085
|
+
const joinSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_JOIN, this.onJoinListener);
|
|
1092
1086
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_JOIN] = joinSubscription;
|
|
1093
1087
|
}
|
|
1094
1088
|
// Adding App Delegate listener
|
|
@@ -1100,7 +1094,7 @@ export class HMSSDK {
|
|
|
1100
1094
|
// Checking if we already have ON_ROOM_UPDATE subscription
|
|
1101
1095
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_ROOM_UPDATE]) {
|
|
1102
1096
|
// Adding ON_ROOM_UPDATE native listener
|
|
1103
|
-
const roomSubscription =
|
|
1097
|
+
const roomSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_ROOM_UPDATE, this.onRoomListener);
|
|
1104
1098
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_ROOM_UPDATE] = roomSubscription;
|
|
1105
1099
|
}
|
|
1106
1100
|
// Adding App Delegate listener
|
|
@@ -1112,7 +1106,7 @@ export class HMSSDK {
|
|
|
1112
1106
|
// Checking if we already have ON_PEER_UPDATE subscription
|
|
1113
1107
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_PEER_UPDATE]) {
|
|
1114
1108
|
// Adding ON_PEER_UPDATE native listener
|
|
1115
|
-
const peerSubscription =
|
|
1109
|
+
const peerSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_PEER_UPDATE, this.onPeerListener);
|
|
1116
1110
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_PEER_UPDATE] = peerSubscription;
|
|
1117
1111
|
}
|
|
1118
1112
|
// Adding App Delegate listener
|
|
@@ -1124,7 +1118,7 @@ export class HMSSDK {
|
|
|
1124
1118
|
// Checking if we already have ON_TRACK_UPDATE subscription
|
|
1125
1119
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_TRACK_UPDATE]) {
|
|
1126
1120
|
// Adding ON_TRACK_UPDATE native listener
|
|
1127
|
-
const trackSubscription =
|
|
1121
|
+
const trackSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_TRACK_UPDATE, this.onTrackListener);
|
|
1128
1122
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_TRACK_UPDATE] = trackSubscription;
|
|
1129
1123
|
}
|
|
1130
1124
|
// Adding App Delegate listener
|
|
@@ -1136,7 +1130,7 @@ export class HMSSDK {
|
|
|
1136
1130
|
// Checking if we already have ON_ERROR subscription
|
|
1137
1131
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_ERROR]) {
|
|
1138
1132
|
// Adding ON_ERROR native listener
|
|
1139
|
-
const errorSubscription =
|
|
1133
|
+
const errorSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_ERROR, this.onErrorListener);
|
|
1140
1134
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_ERROR] = errorSubscription;
|
|
1141
1135
|
}
|
|
1142
1136
|
// Adding App Delegate listener
|
|
@@ -1148,7 +1142,7 @@ export class HMSSDK {
|
|
|
1148
1142
|
// Checking if we already have ON_MESSAGE subscription
|
|
1149
1143
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_MESSAGE]) {
|
|
1150
1144
|
// Adding ON_MESSAGE native listener
|
|
1151
|
-
const messageSubscription =
|
|
1145
|
+
const messageSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_MESSAGE, this.onMessageListener);
|
|
1152
1146
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_MESSAGE] = messageSubscription;
|
|
1153
1147
|
}
|
|
1154
1148
|
// Adding App Delegate listener
|
|
@@ -1160,7 +1154,7 @@ export class HMSSDK {
|
|
|
1160
1154
|
// Checking if we already have ON_SPEAKER subscription
|
|
1161
1155
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_SPEAKER]) {
|
|
1162
1156
|
// Adding ON_SPEAKER native listener
|
|
1163
|
-
const speakerSubscription =
|
|
1157
|
+
const speakerSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_SPEAKER, this.onSpeakerListener);
|
|
1164
1158
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_SPEAKER] = speakerSubscription;
|
|
1165
1159
|
}
|
|
1166
1160
|
// Adding App Delegate listener
|
|
@@ -1172,7 +1166,7 @@ export class HMSSDK {
|
|
|
1172
1166
|
// Checking if we already have RECONNECTING subscription
|
|
1173
1167
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.RECONNECTING]) {
|
|
1174
1168
|
// Adding RECONNECTING native listener
|
|
1175
|
-
const reconnectingSubscription =
|
|
1169
|
+
const reconnectingSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.RECONNECTING, this.reconnectingListener);
|
|
1176
1170
|
this.emitterSubscriptions[HMSUpdateListenerActions.RECONNECTING] = reconnectingSubscription;
|
|
1177
1171
|
}
|
|
1178
1172
|
// Adding App Delegate listener
|
|
@@ -1184,7 +1178,7 @@ export class HMSSDK {
|
|
|
1184
1178
|
// Checking if we already have RECONNECTED subscription
|
|
1185
1179
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.RECONNECTED]) {
|
|
1186
1180
|
// Adding RECONNECTED native listener
|
|
1187
|
-
const reconnectedSubscription =
|
|
1181
|
+
const reconnectedSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.RECONNECTED, this.reconnectedListener);
|
|
1188
1182
|
this.emitterSubscriptions[HMSUpdateListenerActions.RECONNECTED] = reconnectedSubscription;
|
|
1189
1183
|
}
|
|
1190
1184
|
// Adding App Delegate listener
|
|
@@ -1196,7 +1190,7 @@ export class HMSSDK {
|
|
|
1196
1190
|
// Checking if we already have ON_ROLE_CHANGE_REQUEST subscription
|
|
1197
1191
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST]) {
|
|
1198
1192
|
// Adding ON_ROLE_CHANGE_REQUEST native listener
|
|
1199
|
-
const roleChangeReqSubscription =
|
|
1193
|
+
const roleChangeReqSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST, this.onRoleChangeRequestListener);
|
|
1200
1194
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST] = roleChangeReqSubscription;
|
|
1201
1195
|
}
|
|
1202
1196
|
// Adding App Delegate listener
|
|
@@ -1208,7 +1202,7 @@ export class HMSSDK {
|
|
|
1208
1202
|
// Checking if we already have ON_CHANGE_TRACK_STATE_REQUEST subscription
|
|
1209
1203
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST]) {
|
|
1210
1204
|
// Adding ON_CHANGE_TRACK_STATE_REQUEST native listener
|
|
1211
|
-
const changeTrackReqSubscription =
|
|
1205
|
+
const changeTrackReqSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST, this.onChangeTrackStateRequestListener);
|
|
1212
1206
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST] = changeTrackReqSubscription;
|
|
1213
1207
|
}
|
|
1214
1208
|
// Adding App Delegate listener
|
|
@@ -1220,7 +1214,7 @@ export class HMSSDK {
|
|
|
1220
1214
|
// Checking if we already have ON_REMOVED_FROM_ROOM subscription
|
|
1221
1215
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM]) {
|
|
1222
1216
|
// Adding ON_REMOVED_FROM_ROOM native listener
|
|
1223
|
-
const removedFromRoomSubscription =
|
|
1217
|
+
const removedFromRoomSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM, this.onRemovedFromRoomListener);
|
|
1224
1218
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM] = removedFromRoomSubscription;
|
|
1225
1219
|
}
|
|
1226
1220
|
// Adding App Delegate listener
|
|
@@ -1232,7 +1226,7 @@ export class HMSSDK {
|
|
|
1232
1226
|
// Checking if we already have ON_RTC_STATS subscription
|
|
1233
1227
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_RTC_STATS]) {
|
|
1234
1228
|
// Adding ON_RTC_STATS native listener
|
|
1235
|
-
const rtcStatsSubscription =
|
|
1229
|
+
const rtcStatsSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_RTC_STATS, this.RTCStatsListener);
|
|
1236
1230
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_RTC_STATS] = rtcStatsSubscription;
|
|
1237
1231
|
}
|
|
1238
1232
|
// Adding App Delegate listener
|
|
@@ -1244,7 +1238,7 @@ export class HMSSDK {
|
|
|
1244
1238
|
// Checking if we already have ON_LOCAL_AUDIO_STATS subscription
|
|
1245
1239
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_LOCAL_AUDIO_STATS]) {
|
|
1246
1240
|
// Adding ON_LOCAL_AUDIO_STATS native listener
|
|
1247
|
-
const lclAudioStatsSubscription =
|
|
1241
|
+
const lclAudioStatsSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_LOCAL_AUDIO_STATS, this.onLocalAudioStatsListener);
|
|
1248
1242
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_LOCAL_AUDIO_STATS] = lclAudioStatsSubscription;
|
|
1249
1243
|
}
|
|
1250
1244
|
// Adding App Delegate listener
|
|
@@ -1256,7 +1250,7 @@ export class HMSSDK {
|
|
|
1256
1250
|
// Checking if we already have ON_LOCAL_VIDEO_STATS subscription
|
|
1257
1251
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_LOCAL_VIDEO_STATS]) {
|
|
1258
1252
|
// Adding ON_LOCAL_VIDEO_STATS native listener
|
|
1259
|
-
const lclVideoStatsSubscription =
|
|
1253
|
+
const lclVideoStatsSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_LOCAL_VIDEO_STATS, this.onLocalVideoStatsListener);
|
|
1260
1254
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_LOCAL_VIDEO_STATS] = lclVideoStatsSubscription;
|
|
1261
1255
|
}
|
|
1262
1256
|
// Adding App Delegate listener
|
|
@@ -1268,7 +1262,7 @@ export class HMSSDK {
|
|
|
1268
1262
|
// Checking if we already have ON_REMOTE_AUDIO_STATS subscription
|
|
1269
1263
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_REMOTE_AUDIO_STATS]) {
|
|
1270
1264
|
// Adding ON_REMOTE_AUDIO_STATS native listener
|
|
1271
|
-
const rmAudioStatsSubscription =
|
|
1265
|
+
const rmAudioStatsSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_REMOTE_AUDIO_STATS, this.onRemoteAudioStatsListener);
|
|
1272
1266
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_REMOTE_AUDIO_STATS] = rmAudioStatsSubscription;
|
|
1273
1267
|
}
|
|
1274
1268
|
// Adding App Delegate listener
|
|
@@ -1280,7 +1274,7 @@ export class HMSSDK {
|
|
|
1280
1274
|
// Checking if we already have ON_REMOTE_VIDEO_STATS subscription
|
|
1281
1275
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS]) {
|
|
1282
1276
|
// Adding ON_REMOTE_VIDEO_STATS native listener
|
|
1283
|
-
const rmVideoStatsSubscription =
|
|
1277
|
+
const rmVideoStatsSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS, this.onRemoteVideoStatsListener);
|
|
1284
1278
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS] = rmVideoStatsSubscription;
|
|
1285
1279
|
}
|
|
1286
1280
|
// Adding App Delegate listener
|
|
@@ -1292,7 +1286,7 @@ export class HMSSDK {
|
|
|
1292
1286
|
// Checking if we already have ON_AUDIO_DEVICE_CHANGED subscription
|
|
1293
1287
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED]) {
|
|
1294
1288
|
// Adding ON_AUDIO_DEVICE_CHANGED native listener
|
|
1295
|
-
const audDeviceChgSubscription =
|
|
1289
|
+
const audDeviceChgSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED, this.onAudioDeviceChangedListener);
|
|
1296
1290
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED] = audDeviceChgSubscription;
|
|
1297
1291
|
}
|
|
1298
1292
|
// Adding App Delegate listener
|
|
@@ -1304,7 +1298,7 @@ export class HMSSDK {
|
|
|
1304
1298
|
// Checking if we already have ON_SESSION_STORE_AVAILABLE subscription
|
|
1305
1299
|
if (!this.emitterSubscriptions[HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE]) {
|
|
1306
1300
|
// Adding ON_SESSION_STORE_AVAILABLE native listener
|
|
1307
|
-
const sessionStoreAvailableSubscription =
|
|
1301
|
+
const sessionStoreAvailableSubscription = HMSNativeEventListener.addListener(this.id, HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE, this.onSessionStoreAvailableListener);
|
|
1308
1302
|
this.emitterSubscriptions[HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE] = sessionStoreAvailableSubscription;
|
|
1309
1303
|
}
|
|
1310
1304
|
// Adding Session Store Available App Delegate listener
|
|
@@ -1317,7 +1311,7 @@ export class HMSSDK {
|
|
|
1317
1311
|
// Checking if we already have ON_PIP_ROOM_LEAVE subscription
|
|
1318
1312
|
if (!this.emitterSubscriptions[HMSPIPListenerActions.ON_PIP_ROOM_LEAVE]) {
|
|
1319
1313
|
// Adding ON_PIP_ROOM_LEAVE native listener
|
|
1320
|
-
const pipRoomLeaveSubscription =
|
|
1314
|
+
const pipRoomLeaveSubscription = HMSNativeEventListener.addListener(this.id, HMSPIPListenerActions.ON_PIP_ROOM_LEAVE, this.onPIPRoomLeaveListener);
|
|
1321
1315
|
this.emitterSubscriptions[HMSPIPListenerActions.ON_PIP_ROOM_LEAVE] = pipRoomLeaveSubscription;
|
|
1322
1316
|
}
|
|
1323
1317
|
// Adding App Delegate listener
|
|
@@ -2022,7 +2016,8 @@ export class HMSSDK {
|
|
|
2022
2016
|
// required for iOS Screenshare, not required for Android
|
|
2023
2017
|
frameworkInfo: {
|
|
2024
2018
|
version: major + '.' + minor + '.' + patch,
|
|
2025
|
-
sdkVersion: version
|
|
2019
|
+
sdkVersion: version,
|
|
2020
|
+
isPrebuilt: (params === null || params === void 0 ? void 0 : params.isPrebuilt) || false
|
|
2026
2021
|
},
|
|
2027
2022
|
logSettings: params === null || params === void 0 ? void 0 : params.logSettings
|
|
2028
2023
|
});
|