mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-16 02:44:51 +00:00
feat(android): allow both exoplayer and vlc
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
///
|
||||
/// AndroidBackend.kt
|
||||
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
||||
/// https://github.com/mrousavy/nitro
|
||||
/// Copyright © Marc Rousavy @ Margelo
|
||||
///
|
||||
|
||||
package com.margelo.nitro.omni
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import com.facebook.proguard.annotations.DoNotStrip
|
||||
|
||||
/**
|
||||
* Represents the JavaScript enum/union "AndroidBackend".
|
||||
*/
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
enum class AndroidBackend(@DoNotStrip @Keep val value: Int) {
|
||||
VLC(0),
|
||||
EXOPLAYER(1);
|
||||
|
||||
companion object
|
||||
}
|
||||
+1
-1
@@ -30,7 +30,7 @@ abstract class HybridOmniPlayerFactorySpec: HybridObject() {
|
||||
// Methods
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
abstract fun createPlayer(props: Source?): HybridOmniPlayerSpec
|
||||
abstract fun createPlayer(props: Source?, backend: PlayerBackend?): HybridOmniPlayerSpec
|
||||
|
||||
// Default implementation of `HybridObject.toString()`
|
||||
override fun toString(): String {
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
///
|
||||
/// PlayerBackend.kt
|
||||
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
||||
/// https://github.com/mrousavy/nitro
|
||||
/// Copyright © Marc Rousavy @ Margelo
|
||||
///
|
||||
|
||||
package com.margelo.nitro.omni
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import com.facebook.proguard.annotations.DoNotStrip
|
||||
import java.util.Objects
|
||||
|
||||
|
||||
/**
|
||||
* Represents the JavaScript object/struct "PlayerBackend".
|
||||
*/
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
data class PlayerBackend(
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
val android: AndroidBackend?
|
||||
) {
|
||||
/* primary constructor */
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is PlayerBackend) return false
|
||||
return Objects.deepEquals(this.android, other.android)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return arrayOf<Any?>(
|
||||
android
|
||||
).contentDeepHashCode()
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Constructor called from C++
|
||||
*/
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
@Suppress("unused")
|
||||
@JvmStatic
|
||||
private fun fromCpp(android: AndroidBackend?): PlayerBackend {
|
||||
return PlayerBackend(android)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user