mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
Added android fix
This commit is contained in:
@@ -9,7 +9,9 @@ class VlcPlayerModule : Module() {
|
|||||||
|
|
||||||
View(VlcPlayerView::class) {
|
View(VlcPlayerView::class) {
|
||||||
Prop("source") { view: VlcPlayerView, source: Map<String, Any> ->
|
Prop("source") { view: VlcPlayerView, source: Map<String, Any> ->
|
||||||
view.setSource(source)
|
if (!view.hasSource) {
|
||||||
|
view.setSource(source)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Prop("paused") { view: VlcPlayerView, paused: Boolean ->
|
Prop("paused") { view: VlcPlayerView, paused: Boolean ->
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class VlcPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
private var startPosition: Int? = 0
|
private var startPosition: Int? = 0
|
||||||
private var isMediaReady: Boolean = false
|
private var isMediaReady: Boolean = false
|
||||||
private var externalTrack: Map<String, String>? = null
|
private var externalTrack: Map<String, String>? = null
|
||||||
|
var hasSource: Boolean = false
|
||||||
|
|
||||||
init {
|
init {
|
||||||
setupView()
|
setupView()
|
||||||
@@ -87,6 +88,7 @@ class VlcPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
// Log.d("VlcPlayerView", "Debug: Subtitle track index is less than -1, not setting")
|
// Log.d("VlcPlayerView", "Debug: Subtitle track index is less than -1, not setting")
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
hasSource = true
|
||||||
|
|
||||||
if (autoplay) {
|
if (autoplay) {
|
||||||
Log.d("VlcPlayerView", "Playing...")
|
Log.d("VlcPlayerView", "Playing...")
|
||||||
|
|||||||
Reference in New Issue
Block a user