fix(android): build issue on the latest react-native version (#3963)
This commit is contained in:
parent
df29c2310d
commit
530686ca82
@ -9,7 +9,7 @@ import com.facebook.react.bridge.NativeModule
|
|||||||
import com.facebook.react.bridge.ReactApplicationContext
|
import com.facebook.react.bridge.ReactApplicationContext
|
||||||
import com.facebook.react.uimanager.ViewManager
|
import com.facebook.react.uimanager.ViewManager
|
||||||
|
|
||||||
class ReactVideoPackage @JvmOverloads constructor(private var config: ReactExoplayerConfig? = null) : ReactPackage {
|
class ReactVideoPackage(private val config: ReactExoplayerConfig? = null) : ReactPackage {
|
||||||
|
|
||||||
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> =
|
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> =
|
||||||
listOf(
|
listOf(
|
||||||
@ -21,9 +21,7 @@ class ReactVideoPackage @JvmOverloads constructor(private var config: ReactExopl
|
|||||||
fun createJSModules(): List<Class<out JavaScriptModule>> = emptyList()
|
fun createJSModules(): List<Class<out JavaScriptModule>> = emptyList()
|
||||||
|
|
||||||
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
||||||
if (config == null) {
|
val effectiveConfig = config ?: DefaultReactExoplayerConfig(reactContext)
|
||||||
config = DefaultReactExoplayerConfig(reactContext)
|
return listOf(ReactExoplayerViewManager(effectiveConfig))
|
||||||
}
|
|
||||||
return listOf(ReactExoplayerViewManager(config!!))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user