@100mslive/react-native-hms 1.1.0 → 1.2.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 +145 -340
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +205 -75
- package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +127 -127
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +153 -115
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +147 -17
- package/android/src/main/java/com/reactnativehmssdk/HMSSDKViewManager.kt +7 -7
- package/ios/HMSDecoder.swift +205 -129
- package/ios/HMSHelper.swift +3 -3
- package/ios/HMSManager.m +3 -0
- package/ios/HMSManager.swift +22 -1
- package/ios/HMSRNSDK.swift +228 -79
- package/ios/HMSView.m +2 -0
- package/ios/HMSView.swift +35 -3
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcuserdata/yogesh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSChangeTrackStateRequest.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +133 -84
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSStreamingState.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoTrack.js +0 -2
- package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSMessageRecipient.js +1 -1
- package/lib/commonjs/classes/HMSMessageRecipient.js.map +1 -1
- package/lib/commonjs/classes/HMSNativeEventEmitter.js +106 -0
- package/lib/commonjs/classes/HMSNativeEventEmitter.js.map +1 -0
- package/lib/commonjs/classes/HMSPeer.js +4 -0
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSPublishSettings.js +0 -6
- package/lib/commonjs/classes/HMSPublishSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSRole.js +0 -6
- package/lib/commonjs/classes/HMSRole.js.map +1 -1
- package/lib/commonjs/classes/HMSRoleChangeRequest.js +3 -1
- package/lib/commonjs/classes/HMSRoleChangeRequest.js.map +1 -1
- package/lib/commonjs/classes/HMSRtmpStreamingState.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +465 -137
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSServerRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSSubscribeSettings.js +0 -2
- package/lib/commonjs/classes/HMSSubscribeSettings.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/module/classes/HMSChangeTrackStateRequest.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +133 -84
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSHLSStreamingState.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoTrack.js +0 -2
- package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSMessageRecipient.js +1 -1
- package/lib/module/classes/HMSMessageRecipient.js.map +1 -1
- package/lib/module/classes/HMSNativeEventEmitter.js +99 -0
- package/lib/module/classes/HMSNativeEventEmitter.js.map +1 -0
- package/lib/module/classes/HMSPeer.js +4 -0
- package/lib/module/classes/HMSPeer.js.map +1 -1
- package/lib/module/classes/HMSPublishSettings.js +0 -6
- package/lib/module/classes/HMSPublishSettings.js.map +1 -1
- package/lib/module/classes/HMSRole.js +0 -6
- package/lib/module/classes/HMSRole.js.map +1 -1
- package/lib/module/classes/HMSRoleChangeRequest.js +3 -1
- package/lib/module/classes/HMSRoleChangeRequest.js.map +1 -1
- package/lib/module/classes/HMSRtmpStreamingState.js.map +1 -1
- package/lib/module/classes/HMSSDK.js +466 -138
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSServerRecordingState.js.map +1 -1
- package/lib/module/classes/HMSSubscribeSettings.js +0 -2
- package/lib/module/classes/HMSSubscribeSettings.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +4 -4
- package/lib/typescript/classes/HMSChangeTrackStateRequest.d.ts +2 -2
- package/lib/typescript/classes/HMSEncoder.d.ts +3 -0
- package/lib/typescript/classes/HMSHLSStreamingState.d.ts +2 -2
- package/lib/typescript/classes/HMSLocalVideoTrack.d.ts +0 -2
- package/lib/typescript/classes/HMSMessageRecipient.d.ts +2 -2
- package/lib/typescript/classes/HMSNativeEventEmitter.d.ts +13 -0
- package/lib/typescript/classes/HMSPublishSettings.d.ts +8 -15
- package/lib/typescript/classes/HMSRole.d.ts +0 -6
- package/lib/typescript/classes/HMSRoleChangeRequest.d.ts +2 -2
- package/lib/typescript/classes/HMSRtmpStreamingState.d.ts +4 -4
- package/lib/typescript/classes/HMSSDK.d.ts +2 -12
- package/lib/typescript/classes/HMSServerRecordingState.d.ts +2 -2
- package/lib/typescript/classes/HMSSubscribeSettings.d.ts +0 -2
- package/lib/typescript/index.d.ts +1 -0
- package/package.json +6 -4
- package/react-native-hms.podspec +1 -1
- package/sdk-versions.json +5 -0
- package/src/classes/HMSBrowserRecordingState.ts +4 -4
- package/src/classes/HMSChangeTrackStateRequest.ts +2 -2
- package/src/classes/HMSEncoder.ts +186 -99
- package/src/classes/HMSHLSStreamingState.ts +2 -2
- package/src/classes/HMSLocalVideoTrack.ts +0 -2
- package/src/classes/HMSMessageRecipient.ts +3 -3
- package/src/classes/HMSNativeEventEmitter.ts +86 -0
- package/src/classes/HMSPeer.ts +4 -0
- package/src/classes/HMSPublishSettings.ts +8 -18
- package/src/classes/HMSRole.ts +0 -9
- package/src/classes/HMSRoleChangeRequest.ts +5 -3
- package/src/classes/HMSRtmpStreamingState.ts +4 -4
- package/src/classes/HMSSDK.tsx +629 -269
- package/src/classes/HMSServerRecordingState.ts +2 -2
- package/src/classes/HMSSubscribeSettings.ts +1 -7
- package/src/index.ts +1 -0
|
@@ -11,8 +11,6 @@ import android.webkit.URLUtil
|
|
|
11
11
|
import androidx.annotation.RequiresApi
|
|
12
12
|
import com.facebook.react.bridge.*
|
|
13
13
|
import com.facebook.react.uimanager.events.RCTEventEmitter
|
|
14
|
-
import java.io.ByteArrayOutputStream
|
|
15
|
-
import java.util.*
|
|
16
14
|
import live.hms.video.audio.HMSAudioManager
|
|
17
15
|
import live.hms.video.error.HMSException
|
|
18
16
|
import live.hms.video.events.AgentType
|
|
@@ -27,12 +25,14 @@ import live.hms.video.services.LogAlarmManager
|
|
|
27
25
|
import live.hms.video.utils.HMSLogger
|
|
28
26
|
import live.hms.video.utils.HmsUtilities
|
|
29
27
|
import org.webrtc.SurfaceViewRenderer
|
|
28
|
+
import java.io.ByteArrayOutputStream
|
|
29
|
+
import java.util.*
|
|
30
30
|
|
|
31
31
|
object HMSHelper {
|
|
32
32
|
|
|
33
33
|
fun areAllRequiredKeysAvailable(
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
map: ReadableMap?,
|
|
35
|
+
requiredKeys: Array<Pair<String, String>>
|
|
36
36
|
): Boolean {
|
|
37
37
|
if (map == null) {
|
|
38
38
|
return false
|
|
@@ -64,8 +64,8 @@ object HMSHelper {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
fun getUnavailableRequiredKey(
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
map: ReadableMap?,
|
|
68
|
+
requiredKeys: Array<Pair<String, String>>
|
|
69
69
|
): String? {
|
|
70
70
|
if (map == null) {
|
|
71
71
|
return "Object_Is_Null"
|
|
@@ -111,8 +111,8 @@ object HMSHelper {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
fun getRolesFromRoleNames(
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
targetedRoles: ArrayList<String>?,
|
|
115
|
+
roles: List<HMSRole>?
|
|
116
116
|
): List<HMSRole> {
|
|
117
117
|
val encodedRoles: MutableList<HMSRole> = mutableListOf()
|
|
118
118
|
|
|
@@ -162,10 +162,10 @@ object HMSHelper {
|
|
|
162
162
|
|
|
163
163
|
fun getFrameworkInfo(data: ReadableMap?): FrameworkInfo? {
|
|
164
164
|
if (data != null &&
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
this.areAllRequiredKeysAvailable(
|
|
166
|
+
data,
|
|
167
|
+
arrayOf(Pair("version", "String"), Pair("sdkVersion", "String"))
|
|
168
|
+
)
|
|
169
169
|
) {
|
|
170
170
|
val version = data.getString("version") as String
|
|
171
171
|
val sdkVersion = data.getString("sdkVersion") as String
|
|
@@ -176,14 +176,14 @@ object HMSHelper {
|
|
|
176
176
|
|
|
177
177
|
fun getLogSettings(data: ReadableMap?): HMSLogSettings? {
|
|
178
178
|
if (data != null &&
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
)
|
|
179
|
+
this.areAllRequiredKeysAvailable(
|
|
180
|
+
data,
|
|
181
|
+
arrayOf(
|
|
182
|
+
Pair("level", "String"),
|
|
183
|
+
Pair("maxDirSizeInBytes", "String"),
|
|
184
|
+
Pair("isLogStorageEnabled", "Boolean")
|
|
186
185
|
)
|
|
186
|
+
)
|
|
187
187
|
) {
|
|
188
188
|
val level = getLogLevel(data.getString("level"))
|
|
189
189
|
val maxDirSizeInBytes = getLogAlarmManager(data.getString("maxDirSizeInBytes"))
|
|
@@ -358,7 +358,7 @@ object HMSHelper {
|
|
|
358
358
|
var hlsMeetingUrlVariant: List<HMSHLSMeetingURLVariant>? = null
|
|
359
359
|
if (areAllRequiredKeysAvailable(data, arrayOf(Pair("meetingURLVariants", "Array")))) {
|
|
360
360
|
val meetingURLVariants =
|
|
361
|
-
|
|
361
|
+
data.getArray("meetingURLVariants")?.toArrayList() as? ArrayList<HashMap<String, String>>
|
|
362
362
|
hlsMeetingUrlVariant = getHMSHLSMeetingURLVariants(meetingURLVariants)
|
|
363
363
|
}
|
|
364
364
|
var hlsRecordingConfig: HMSHlsRecordingConfig? = null
|
|
@@ -370,7 +370,7 @@ object HMSHelper {
|
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
private fun getHMSHLSMeetingURLVariants(
|
|
373
|
-
|
|
373
|
+
hmsMeetingURLVariants: ArrayList<HashMap<String, String>>?
|
|
374
374
|
): List<HMSHLSMeetingURLVariant> {
|
|
375
375
|
val meetingURLVariants = mutableListOf<HMSHLSMeetingURLVariant>()
|
|
376
376
|
if (hmsMeetingURLVariants !== null) {
|
|
@@ -387,16 +387,16 @@ object HMSHelper {
|
|
|
387
387
|
var singleFilePerLayer = false
|
|
388
388
|
var videoOnDemand = false
|
|
389
389
|
if (areAllRequiredKeysAvailable(
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
390
|
+
hmsHlsRecordingConfig,
|
|
391
|
+
arrayOf(Pair("singleFilePerLayer", "Boolean"))
|
|
392
|
+
)
|
|
393
393
|
) {
|
|
394
394
|
singleFilePerLayer = hmsHlsRecordingConfig.getBoolean("singleFilePerLayer")
|
|
395
395
|
}
|
|
396
396
|
if (areAllRequiredKeysAvailable(
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
397
|
+
hmsHlsRecordingConfig,
|
|
398
|
+
arrayOf(Pair("videoOnDemand", "Boolean"))
|
|
399
|
+
)
|
|
400
400
|
) {
|
|
401
401
|
videoOnDemand = hmsHlsRecordingConfig.getBoolean("videoOnDemand")
|
|
402
402
|
}
|
|
@@ -406,7 +406,7 @@ object HMSHelper {
|
|
|
406
406
|
}
|
|
407
407
|
|
|
408
408
|
private fun getHMSHLSMeetingURLVariant(
|
|
409
|
-
|
|
409
|
+
hmsMeetingURLVariant: HashMap<String, String>?
|
|
410
410
|
): HMSHLSMeetingURLVariant {
|
|
411
411
|
var meetingURLVariant = HMSHLSMeetingURLVariant("", "")
|
|
412
412
|
if (hmsMeetingURLVariant !== null) {
|
|
@@ -451,95 +451,95 @@ object HMSHelper {
|
|
|
451
451
|
|
|
452
452
|
fun getHmsConfig(credentials: ReadableMap): HMSConfig {
|
|
453
453
|
var config =
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
454
|
+
HMSConfig(
|
|
455
|
+
credentials.getString("username") as String,
|
|
456
|
+
credentials.getString("authToken") as String
|
|
457
|
+
)
|
|
458
458
|
|
|
459
459
|
when {
|
|
460
460
|
areAllRequiredKeysAvailable(
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
461
|
+
credentials,
|
|
462
|
+
arrayOf(
|
|
463
|
+
Pair("endpoint", "String"),
|
|
464
|
+
Pair("metadata", "String"),
|
|
465
|
+
Pair("captureNetworkQualityInPreview", "Boolean")
|
|
466
|
+
)
|
|
467
467
|
) -> {
|
|
468
468
|
config =
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
469
|
+
HMSConfig(
|
|
470
|
+
credentials.getString("username") as String,
|
|
471
|
+
credentials.getString("authToken") as String,
|
|
472
|
+
initEndpoint = credentials.getString("endpoint") as String,
|
|
473
|
+
metadata = credentials.getString("metadata") as String,
|
|
474
|
+
captureNetworkQualityInPreview =
|
|
475
|
+
credentials.getBoolean("captureNetworkQualityInPreview")
|
|
476
|
+
)
|
|
477
477
|
}
|
|
478
478
|
areAllRequiredKeysAvailable(
|
|
479
|
-
|
|
480
|
-
|
|
479
|
+
credentials,
|
|
480
|
+
arrayOf(Pair("endpoint", "String"), Pair("metadata", "String"))
|
|
481
481
|
) -> {
|
|
482
482
|
config =
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
483
|
+
HMSConfig(
|
|
484
|
+
credentials.getString("username") as String,
|
|
485
|
+
credentials.getString("authToken") as String,
|
|
486
|
+
initEndpoint = credentials.getString("endpoint") as String,
|
|
487
|
+
metadata = credentials.getString("metadata") as String
|
|
488
|
+
)
|
|
489
489
|
}
|
|
490
490
|
areAllRequiredKeysAvailable(
|
|
491
|
-
|
|
492
|
-
|
|
491
|
+
credentials,
|
|
492
|
+
arrayOf(Pair("endpoint", "String"), Pair("captureNetworkQualityInPreview", "Boolean"))
|
|
493
493
|
) -> {
|
|
494
494
|
config =
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
495
|
+
HMSConfig(
|
|
496
|
+
credentials.getString("username") as String,
|
|
497
|
+
credentials.getString("authToken") as String,
|
|
498
|
+
initEndpoint = credentials.getString("endpoint") as String,
|
|
499
|
+
captureNetworkQualityInPreview =
|
|
500
|
+
credentials.getBoolean("captureNetworkQualityInPreview")
|
|
501
|
+
)
|
|
502
502
|
}
|
|
503
503
|
areAllRequiredKeysAvailable(
|
|
504
|
-
|
|
505
|
-
|
|
504
|
+
credentials,
|
|
505
|
+
arrayOf(Pair("metadata", "String"), Pair("captureNetworkQualityInPreview", "Boolean"))
|
|
506
506
|
) -> {
|
|
507
507
|
config =
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
508
|
+
HMSConfig(
|
|
509
|
+
credentials.getString("username") as String,
|
|
510
|
+
credentials.getString("authToken") as String,
|
|
511
|
+
metadata = credentials.getString("metadata") as String,
|
|
512
|
+
captureNetworkQualityInPreview =
|
|
513
|
+
credentials.getBoolean("captureNetworkQualityInPreview")
|
|
514
|
+
)
|
|
515
515
|
}
|
|
516
516
|
areAllRequiredKeysAvailable(credentials, arrayOf(Pair("endpoint", "String"))) -> {
|
|
517
517
|
config =
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
518
|
+
HMSConfig(
|
|
519
|
+
credentials.getString("username") as String,
|
|
520
|
+
credentials.getString("authToken") as String,
|
|
521
|
+
initEndpoint = credentials.getString("endpoint") as String
|
|
522
|
+
)
|
|
523
523
|
}
|
|
524
524
|
areAllRequiredKeysAvailable(credentials, arrayOf(Pair("metadata", "String"))) -> {
|
|
525
525
|
config =
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
526
|
+
HMSConfig(
|
|
527
|
+
credentials.getString("username") as String,
|
|
528
|
+
credentials.getString("authToken") as String,
|
|
529
|
+
metadata = credentials.getString("metadata") as String
|
|
530
|
+
)
|
|
531
531
|
}
|
|
532
532
|
areAllRequiredKeysAvailable(
|
|
533
|
-
|
|
534
|
-
|
|
533
|
+
credentials,
|
|
534
|
+
arrayOf(Pair("captureNetworkQualityInPreview", "Boolean"))
|
|
535
535
|
) -> {
|
|
536
536
|
config =
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
537
|
+
HMSConfig(
|
|
538
|
+
credentials.getString("username") as String,
|
|
539
|
+
credentials.getString("authToken") as String,
|
|
540
|
+
captureNetworkQualityInPreview =
|
|
541
|
+
credentials.getBoolean("captureNetworkQualityInPreview")
|
|
542
|
+
)
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
return config
|
|
@@ -547,11 +547,11 @@ object HMSHelper {
|
|
|
547
547
|
|
|
548
548
|
@RequiresApi(Build.VERSION_CODES.N)
|
|
549
549
|
fun captureSurfaceView(
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
550
|
+
surfaceView: SurfaceViewRenderer,
|
|
551
|
+
sdkId: String,
|
|
552
|
+
args: ReadableArray?,
|
|
553
|
+
context: Context,
|
|
554
|
+
id: Int
|
|
555
555
|
) {
|
|
556
556
|
val output = Arguments.createMap()
|
|
557
557
|
if (args != null) {
|
|
@@ -562,40 +562,40 @@ object HMSHelper {
|
|
|
562
562
|
val reactContext = context as ReactContext
|
|
563
563
|
try {
|
|
564
564
|
val bitmap: Bitmap =
|
|
565
|
-
|
|
565
|
+
Bitmap.createBitmap(surfaceView.width, surfaceView.height, Bitmap.Config.ARGB_8888)
|
|
566
566
|
PixelCopy.request(
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
)
|
|
567
|
+
surfaceView,
|
|
568
|
+
bitmap,
|
|
569
|
+
{ copyResult ->
|
|
570
|
+
if (copyResult == PixelCopy.SUCCESS) {
|
|
571
|
+
Log.d("captureSurfaceView", "bitmap: $bitmap")
|
|
572
|
+
val byteArrayOutputStream = ByteArrayOutputStream()
|
|
573
|
+
bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream)
|
|
574
|
+
val byteArray = byteArrayOutputStream.toByteArray()
|
|
575
|
+
val encoded: String = Base64.encodeToString(byteArray, Base64.DEFAULT)
|
|
576
|
+
Log.d("captureSurfaceView", "Base64: $encoded")
|
|
577
|
+
output.putString("result", encoded)
|
|
578
|
+
reactContext
|
|
579
|
+
.getJSModule(RCTEventEmitter::class.java)
|
|
580
|
+
.receiveEvent(id, "captureFrame", output)
|
|
581
|
+
} else {
|
|
582
|
+
Log.e("captureSurfaceView", "copyResult: $copyResult")
|
|
583
|
+
HMSManager.hmsCollection[sdkId]?.emitHMSError(
|
|
584
|
+
HMSException(
|
|
585
|
+
103,
|
|
586
|
+
copyResult.toString(),
|
|
587
|
+
copyResult.toString(),
|
|
588
|
+
copyResult.toString(),
|
|
589
|
+
copyResult.toString()
|
|
591
590
|
)
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
}
|
|
598
|
-
|
|
591
|
+
)
|
|
592
|
+
output.putString("error", copyResult.toString())
|
|
593
|
+
reactContext
|
|
594
|
+
.getJSModule(RCTEventEmitter::class.java)
|
|
595
|
+
.receiveEvent(id, "captureFrame", output)
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
Handler()
|
|
599
599
|
)
|
|
600
600
|
} catch (e: Exception) {
|
|
601
601
|
Log.e("captureSurfaceView", "error: $e")
|