refactor(android): migrate ReactExoplayerViewManager to Kotlin (#4011)
* Rename .java to .kt * refactor(android): migrate ReactExoplayerViewManager to Kotlin * fix: lint error * refactor: setPreventsDisplaySleepDuringVideoPlayback function
This commit is contained in:
committed by
GitHub
parent
22cfd6cead
commit
74c6dd6279
@@ -29,21 +29,19 @@ class ReactNativeVideoManager : RNVPlugin {
|
||||
/**
|
||||
* register a new ReactExoplayerViewManager in the managed list
|
||||
*/
|
||||
fun registerView(newInstance: ReactExoplayerViewManager): () -> Boolean =
|
||||
{
|
||||
if (instanceList.size > 2) {
|
||||
DebugLog.d(TAG, "multiple Video displayed ?")
|
||||
}
|
||||
instanceList.add(newInstance)
|
||||
fun registerView(newInstance: ReactExoplayerViewManager) {
|
||||
if (instanceList.size > 2) {
|
||||
DebugLog.d(TAG, "multiple Video displayed ?")
|
||||
}
|
||||
instanceList.add(newInstance)
|
||||
}
|
||||
|
||||
/**
|
||||
* unregister existing ReactExoplayerViewManager in the managed list
|
||||
*/
|
||||
fun unregisterView(newInstance: ReactExoplayerViewManager): () -> Boolean =
|
||||
{
|
||||
instanceList.remove(newInstance)
|
||||
}
|
||||
fun unregisterView(newInstance: ReactExoplayerViewManager) {
|
||||
instanceList.remove(newInstance)
|
||||
}
|
||||
|
||||
/**
|
||||
* register a new plugin in the managed list
|
||||
|
Reference in New Issue
Block a user