mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-16 02:44:51 +00:00
fix(nitro): fix native codegen
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
///
|
||||
/// CastStatus.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 "CastStatus".
|
||||
*/
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
enum class CastStatus(@DoNotStrip @Keep val value: Int) {
|
||||
CONNECTING(0),
|
||||
CONNECTED(1),
|
||||
AVAILABLE(2),
|
||||
UNAVAILABLE(3),
|
||||
UNSUPPORTED(4);
|
||||
|
||||
companion object
|
||||
}
|
||||
+8
@@ -102,6 +102,10 @@ abstract class HybridOmniPlayerSpec: HybridObject() {
|
||||
@get:DoNotStrip
|
||||
@get:Keep
|
||||
abstract val isAutoQuality: Boolean
|
||||
|
||||
@get:DoNotStrip
|
||||
@get:Keep
|
||||
abstract val castStatus: CastStatus
|
||||
|
||||
// Methods
|
||||
@DoNotStrip
|
||||
@@ -120,6 +124,10 @@ abstract class HybridOmniPlayerSpec: HybridObject() {
|
||||
@Keep
|
||||
abstract fun seekBy(offset: Double): Unit
|
||||
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
abstract fun toggleCastStatus(): Unit
|
||||
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
abstract fun playPrev(): Unit
|
||||
|
||||
+6
@@ -43,6 +43,12 @@ abstract class HybridOmniViewSpec: HybridView() {
|
||||
@set:DoNotStrip
|
||||
@set:Keep
|
||||
abstract var autoPip: Boolean?
|
||||
|
||||
@get:DoNotStrip
|
||||
@get:Keep
|
||||
@set:DoNotStrip
|
||||
@set:Keep
|
||||
abstract var subtitleAssets: SubtitleAssets?
|
||||
|
||||
// Methods
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
///
|
||||
/// JassubAssets.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 "JassubAssets".
|
||||
*/
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
data class JassubAssets(
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
val workerUrl: String?,
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
val wasmUrl: String?,
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
val modernWasmUrl: String?,
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
val fontUrl: String?
|
||||
) {
|
||||
/* primary constructor */
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is JassubAssets) return false
|
||||
return Objects.deepEquals(this.workerUrl, other.workerUrl)
|
||||
&& Objects.deepEquals(this.wasmUrl, other.wasmUrl)
|
||||
&& Objects.deepEquals(this.modernWasmUrl, other.modernWasmUrl)
|
||||
&& Objects.deepEquals(this.fontUrl, other.fontUrl)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return arrayOf<Any?>(
|
||||
workerUrl,
|
||||
wasmUrl,
|
||||
modernWasmUrl,
|
||||
fontUrl
|
||||
).contentDeepHashCode()
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Constructor called from C++
|
||||
*/
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
@Suppress("unused")
|
||||
@JvmStatic
|
||||
private fun fromCpp(workerUrl: String?, wasmUrl: String?, modernWasmUrl: String?, fontUrl: String?): JassubAssets {
|
||||
return JassubAssets(workerUrl, wasmUrl, modernWasmUrl, fontUrl)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ package com.margelo.nitro.omni
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import com.facebook.proguard.annotations.DoNotStrip
|
||||
import java.util.Objects
|
||||
|
||||
|
||||
/**
|
||||
@@ -38,6 +39,28 @@ data class Metadata(
|
||||
) {
|
||||
/* primary constructor */
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is Metadata) return false
|
||||
return Objects.deepEquals(this.title, other.title)
|
||||
&& Objects.deepEquals(this.album, other.album)
|
||||
&& Objects.deepEquals(this.artist, other.artist)
|
||||
&& Objects.deepEquals(this.imageLink, other.imageLink)
|
||||
&& Objects.deepEquals(this.hasPrev, other.hasPrev)
|
||||
&& Objects.deepEquals(this.hasNext, other.hasNext)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return arrayOf<Any?>(
|
||||
title,
|
||||
album,
|
||||
artist,
|
||||
imageLink,
|
||||
hasPrev,
|
||||
hasNext
|
||||
).contentDeepHashCode()
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Constructor called from C++
|
||||
|
||||
+2
-1
@@ -21,7 +21,8 @@ enum class NumberProperty(@DoNotStrip @Keep val value: Int) {
|
||||
DURATION(2),
|
||||
PLAYBACKRATE(3),
|
||||
VOLUME(4),
|
||||
ISAUTOQUALITY(5);
|
||||
ISAUTOQUALITY(5),
|
||||
CASTSTATUS(6);
|
||||
|
||||
companion object
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
///
|
||||
/// PgsAssets.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 "PgsAssets".
|
||||
*/
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
data class PgsAssets(
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
val workerUrl: String?
|
||||
) {
|
||||
/* primary constructor */
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is PgsAssets) return false
|
||||
return Objects.deepEquals(this.workerUrl, other.workerUrl)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return arrayOf<Any?>(
|
||||
workerUrl
|
||||
).contentDeepHashCode()
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Constructor called from C++
|
||||
*/
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
@Suppress("unused")
|
||||
@JvmStatic
|
||||
private fun fromCpp(workerUrl: String?): PgsAssets {
|
||||
return PgsAssets(workerUrl)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ package com.margelo.nitro.omni
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import com.facebook.proguard.annotations.DoNotStrip
|
||||
import java.util.Objects
|
||||
|
||||
|
||||
/**
|
||||
@@ -35,6 +36,26 @@ data class Rendition(
|
||||
) {
|
||||
/* primary constructor */
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is Rendition) return false
|
||||
return Objects.deepEquals(this.id, other.id)
|
||||
&& Objects.deepEquals(this.width, other.width)
|
||||
&& Objects.deepEquals(this.height, other.height)
|
||||
&& Objects.deepEquals(this.bitrate, other.bitrate)
|
||||
&& Objects.deepEquals(this.selected, other.selected)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return arrayOf<Any?>(
|
||||
id,
|
||||
width,
|
||||
height,
|
||||
bitrate,
|
||||
selected
|
||||
).contentDeepHashCode()
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Constructor called from C++
|
||||
|
||||
@@ -9,6 +9,7 @@ package com.margelo.nitro.omni
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import com.facebook.proguard.annotations.DoNotStrip
|
||||
import java.util.Objects
|
||||
|
||||
|
||||
/**
|
||||
@@ -28,13 +29,43 @@ data class Source(
|
||||
val subtitles: Array<Subtitle>,
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
val fonts: Array<String>?,
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
val metadata: Metadata?,
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
val mixAudio: MixAudioMode?
|
||||
val mixAudio: MixAudioMode?,
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
val castData: Map<String, String>?
|
||||
) {
|
||||
/* primary constructor */
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is Source) return false
|
||||
return Objects.deepEquals(this.src, other.src)
|
||||
&& Objects.deepEquals(this.startTime, other.startTime)
|
||||
&& Objects.deepEquals(this.subtitles, other.subtitles)
|
||||
&& Objects.deepEquals(this.fonts, other.fonts)
|
||||
&& Objects.deepEquals(this.metadata, other.metadata)
|
||||
&& Objects.deepEquals(this.mixAudio, other.mixAudio)
|
||||
&& Objects.deepEquals(this.castData, other.castData)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return arrayOf<Any?>(
|
||||
src,
|
||||
startTime,
|
||||
subtitles,
|
||||
fonts,
|
||||
metadata,
|
||||
mixAudio,
|
||||
castData
|
||||
).contentDeepHashCode()
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Constructor called from C++
|
||||
@@ -43,8 +74,8 @@ data class Source(
|
||||
@Keep
|
||||
@Suppress("unused")
|
||||
@JvmStatic
|
||||
private fun fromCpp(src: Array<VideoSrc>, startTime: Double?, subtitles: Array<Subtitle>, metadata: Metadata?, mixAudio: MixAudioMode?): Source {
|
||||
return Source(src, startTime, subtitles, metadata, mixAudio)
|
||||
private fun fromCpp(src: Array<VideoSrc>, startTime: Double?, subtitles: Array<Subtitle>, fonts: Array<String>?, metadata: Metadata?, mixAudio: MixAudioMode?, castData: Map<String, String>?): Source {
|
||||
return Source(src, startTime, subtitles, fonts, metadata, mixAudio, castData)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ package com.margelo.nitro.omni
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import com.facebook.proguard.annotations.DoNotStrip
|
||||
import java.util.Objects
|
||||
|
||||
|
||||
/**
|
||||
@@ -35,6 +36,26 @@ data class Subtitle(
|
||||
) {
|
||||
/* primary constructor */
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is Subtitle) return false
|
||||
return Objects.deepEquals(this.id, other.id)
|
||||
&& Objects.deepEquals(this.link, other.link)
|
||||
&& Objects.deepEquals(this.mimeType, other.mimeType)
|
||||
&& Objects.deepEquals(this.language, other.language)
|
||||
&& Objects.deepEquals(this.label, other.label)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return arrayOf<Any?>(
|
||||
id,
|
||||
link,
|
||||
mimeType,
|
||||
language,
|
||||
label
|
||||
).contentDeepHashCode()
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Constructor called from C++
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
///
|
||||
/// SubtitleAssets.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 "SubtitleAssets".
|
||||
*/
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
data class SubtitleAssets(
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
val jassub: JassubAssets?,
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
val pgs: PgsAssets?
|
||||
) {
|
||||
/* primary constructor */
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is SubtitleAssets) return false
|
||||
return Objects.deepEquals(this.jassub, other.jassub)
|
||||
&& Objects.deepEquals(this.pgs, other.pgs)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return arrayOf<Any?>(
|
||||
jassub,
|
||||
pgs
|
||||
).contentDeepHashCode()
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Constructor called from C++
|
||||
*/
|
||||
@DoNotStrip
|
||||
@Keep
|
||||
@Suppress("unused")
|
||||
@JvmStatic
|
||||
private fun fromCpp(jassub: JassubAssets?, pgs: PgsAssets?): SubtitleAssets {
|
||||
return SubtitleAssets(jassub, pgs)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ package com.margelo.nitro.omni
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import com.facebook.proguard.annotations.DoNotStrip
|
||||
import java.util.Objects
|
||||
|
||||
|
||||
/**
|
||||
@@ -32,6 +33,24 @@ data class Track(
|
||||
) {
|
||||
/* primary constructor */
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is Track) return false
|
||||
return Objects.deepEquals(this.id, other.id)
|
||||
&& Objects.deepEquals(this.label, other.label)
|
||||
&& Objects.deepEquals(this.language, other.language)
|
||||
&& Objects.deepEquals(this.selected, other.selected)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return arrayOf<Any?>(
|
||||
id,
|
||||
label,
|
||||
language,
|
||||
selected
|
||||
).contentDeepHashCode()
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Constructor called from C++
|
||||
|
||||
@@ -9,6 +9,7 @@ package com.margelo.nitro.omni
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import com.facebook.proguard.annotations.DoNotStrip
|
||||
import java.util.Objects
|
||||
|
||||
|
||||
/**
|
||||
@@ -29,6 +30,22 @@ data class VideoSrc(
|
||||
) {
|
||||
/* primary constructor */
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is VideoSrc) return false
|
||||
return Objects.deepEquals(this.uri, other.uri)
|
||||
&& Objects.deepEquals(this.mimeType, other.mimeType)
|
||||
&& Objects.deepEquals(this.headers, other.headers)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return arrayOf<Any?>(
|
||||
uri,
|
||||
mimeType,
|
||||
headers
|
||||
).contentDeepHashCode()
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Constructor called from C++
|
||||
|
||||
Reference in New Issue
Block a user