mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
Fixed not starting at the correct posistion when playing video
This commit is contained in:
@@ -50,7 +50,7 @@ class VlcPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
val uri = source["uri"] as? String
|
val uri = source["uri"] as? String
|
||||||
val autoplay = source["autoplay"] as? Boolean ?: false
|
val autoplay = source["autoplay"] as? Boolean ?: false
|
||||||
val isNetwork = source["isNetwork"] as? Boolean ?: false
|
val isNetwork = source["isNetwork"] as? Boolean ?: false
|
||||||
startPosition = source["startPosition"] as? Int ?: 0
|
startPosition = (source["startPosition"] as? Double)?.toInt() ?: 0
|
||||||
|
|
||||||
// Handle video load start event
|
// Handle video load start event
|
||||||
// onVideoLoadStart?.invoke(mapOf("target" to reactTag ?: "null"))
|
// onVideoLoadStart?.invoke(mapOf("target" to reactTag ?: "null"))
|
||||||
@@ -149,6 +149,7 @@ class VlcPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
override fun onDetachedFromWindow() {
|
override fun onDetachedFromWindow() {
|
||||||
super.onDetachedFromWindow()
|
super.onDetachedFromWindow()
|
||||||
mediaPlayer?.release()
|
mediaPlayer?.release()
|
||||||
|
mediaPlayer = null
|
||||||
libVLC?.release()
|
libVLC?.release()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user