expo-libmpv 0.5.8 → 0.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -295,11 +295,12 @@ class LibmpvRenderer(
|
|
|
295
295
|
|
|
296
296
|
try {
|
|
297
297
|
loadedUrl = url
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
298
|
+
val initialSeek = session.seekToSeconds
|
|
299
|
+
if (initialSeek != null && session.needsApply(LibmpvSession.MpvIntent.SEEK)) {
|
|
300
|
+
MPVLib.setOptionString("start", initialSeek.toString())
|
|
301
|
+
session.markApplied(LibmpvSession.MpvIntent.SEEK)
|
|
302
|
+
} else {
|
|
303
|
+
MPVLib.setOptionString("start", "0")
|
|
303
304
|
}
|
|
304
305
|
|
|
305
306
|
MPVLib.command(
|
|
@@ -354,16 +355,15 @@ class LibmpvRenderer(
|
|
|
354
355
|
}
|
|
355
356
|
}
|
|
356
357
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}
|
|
358
|
+
session.seekToSeconds?.let { seekToSeconds ->
|
|
359
|
+
if (
|
|
360
|
+
session.needsApply(LibmpvSession.MpvIntent.SEEK) &&
|
|
361
|
+
session.hasFileLoaded
|
|
362
|
+
) {
|
|
363
363
|
MPVLib.command(
|
|
364
364
|
arrayOf(
|
|
365
365
|
"seek",
|
|
366
|
-
|
|
366
|
+
seekToSeconds.toString(),
|
|
367
367
|
"absolute"
|
|
368
368
|
)
|
|
369
369
|
)
|
|
@@ -526,4 +526,4 @@ class LibmpvRenderer(
|
|
|
526
526
|
Log.e(TAG, "mpv error", e)
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
}
|
|
529
|
+
}
|