ff5a8b8900
* fix: Use custom CoroutineScope * fix: Use custom `CoroutineScope` * Make `frameProcessorThread` and `coroutineScope` instance variables * Update VisionCameraScheduler.java * Remove `HybridData::resetNative()` calls they're called by a Java GC destructor anyways. * Update CameraViewManager.kt * Update CameraView.kt
17 lines
565 B
Kotlin
17 lines
565 B
Kotlin
package com.mrousavy.camera
|
|
|
|
import com.facebook.react.ReactPackage
|
|
import com.facebook.react.bridge.NativeModule
|
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
import com.facebook.react.uimanager.ViewManager
|
|
|
|
class CameraPackage : ReactPackage {
|
|
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
|
|
return listOf(CameraViewModule(reactContext))
|
|
}
|
|
|
|
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
|
return listOf(CameraViewManager(reactContext))
|
|
}
|
|
}
|