expo-libmpv 0.5.8 → 0.5.9

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,13 +295,6 @@ class LibmpvRenderer(
295
295
 
296
296
  try {
297
297
  loadedUrl = url
298
- MPVLib.setOptionString("start", "0")
299
-
300
- val start = session.seekToSeconds
301
- if (start != null) {
302
- MPVLib.setOptionString("start", start.toLong().toString())
303
- }
304
-
305
298
  MPVLib.command(
306
299
  arrayOf(
307
300
  "loadfile",
@@ -354,16 +347,15 @@ class LibmpvRenderer(
354
347
  }
355
348
  }
356
349
 
357
- if (session.needsApply(LibmpvSession.MpvIntent.SEEK)) {
358
- val target = session.seekToSeconds
359
- if (target != null) {
360
- if (!session.hasFileLoaded) {
361
- return
362
- }
350
+ session.seekToSeconds?.let { seekToSeconds ->
351
+ if (
352
+ session.needsApply(LibmpvSession.MpvIntent.SEEK) &&
353
+ session.hasFileLoaded
354
+ ) {
363
355
  MPVLib.command(
364
356
  arrayOf(
365
357
  "seek",
366
- target.toString(),
358
+ seekToSeconds.toString(),
367
359
  "absolute"
368
360
  )
369
361
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-libmpv",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "A libmpv Fabric component for Android",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",