expo-libvlc-player 7.0.27 → 7.0.29

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.
package/README.md CHANGED
@@ -289,13 +289,13 @@ interface MediaInfo {
289
289
 
290
290
  On Android, the `libvlcjni` player detaches from the View after switching screens.
291
291
 
292
- The current workaround attaches the View back but this causes a brief black screen.
292
+ The current workaround attaches the View back to the player but it causes a brief black screen.
293
293
 
294
294
  https://code.videolan.org/videolan/vlc-android/-/issues/1495
295
295
 
296
- On iOS, the `VLCKit` player loses the current video track after pausing in the background.
296
+ On iOS, the `VLCKit` player deselects the video track after pausing in the background.
297
297
 
298
- The current workaround restores the selected video track but this causes a brief black screen.
298
+ The current workaround selects the video track back but it causes a brief black screen.
299
299
 
300
300
  https://code.videolan.org/videolan/VLCKit/-/issues/743
301
301
 
@@ -602,18 +602,10 @@ class LibVlcPlayerView(
602
602
  type: String? = "time",
603
603
  ) {
604
604
  mediaPlayer?.let { player ->
605
- if (player.isSeekable()) {
606
- if (type == "position") {
607
- player.setPosition(value.toFloat())
608
- } else {
609
- player.setTime(value.toLong())
610
- }
605
+ if (type == "position") {
606
+ player.setPosition(value.toFloat())
611
607
  } else {
612
- if (type == "position") {
613
- time = (value * getMediaLength().toDouble()).toInt()
614
- } else {
615
- time = value.toInt()
616
- }
608
+ player.setTime(value.toLong())
617
609
  }
618
610
  }
619
611
  }
@@ -307,10 +307,9 @@ class LibVlcPlayerView: ExpoView {
307
307
  videoTrack.isSelected = false
308
308
  videoTrack.isSelectedExclusively = true
309
309
 
310
+ // Black screen workaround
310
311
  DispatchQueue.main.async {
311
- if player.isSeekable {
312
- player.time = VLCTime(int: player.time.intValue)
313
- }
312
+ player.time = VLCTime(int: player.time.intValue)
314
313
  }
315
314
  }
316
315
 
@@ -466,18 +465,10 @@ class LibVlcPlayerView: ExpoView {
466
465
 
467
466
  func seek(_ value: Double, _ type: String? = "time") {
468
467
  if let player = mediaPlayer {
469
- if player.isSeekable {
470
- if type == "position" {
471
- player.position = value
472
- } else {
473
- player.time = VLCTime(int: Int32(value))
474
- }
468
+ if type == "position" {
469
+ player.position = value
475
470
  } else {
476
- if type == "position" {
477
- time = Int(value * Double(getMediaLength()))
478
- } else {
479
- time = Int(value)
480
- }
471
+ player.time = VLCTime(int: Int32(value))
481
472
  }
482
473
  }
483
474
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-libvlc-player",
3
- "version": "7.0.27",
3
+ "version": "7.0.29",
4
4
  "description": "LibVLC Player for Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",