expo-libvlc-player 7.0.20 → 7.0.21

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.
@@ -63,7 +63,6 @@ class LibVlcPlayerView(
63
63
 
64
64
  var firstPlay: Boolean = true
65
65
  private var shouldInit: Boolean = true
66
- var isInBackground: Boolean = false
67
66
 
68
67
  val onBuffering by EventDispatcher<Unit>()
69
68
  val onPlaying by EventDispatcher<Unit>()
@@ -42,7 +42,6 @@ object MediaPlayerManager {
42
42
 
43
43
  fun onModuleForeground() {
44
44
  expoViews.forEach { view ->
45
- view.isInBackground = false
46
45
  view.onForeground(Unit)
47
46
  view.cancelPauseJob()
48
47
  }
@@ -50,7 +49,6 @@ object MediaPlayerManager {
50
49
 
51
50
  fun onModuleBackground() {
52
51
  expoViews.forEach { view ->
53
- view.isInBackground = true
54
52
  view.onBackground(Unit)
55
53
  view.pauseJob()
56
54
  }
@@ -471,10 +471,12 @@ class LibVlcPlayerView: ExpoView {
471
471
  }
472
472
 
473
473
  func seekZero() {
474
- if let player = mediaPlayer {
475
- // Black screen workaround
476
- player.time = VLCTime(int: Int32(player.time.intValue))
477
- }
474
+ guard let player = mediaPlayer,
475
+ !player.isPlaying
476
+ else { return }
477
+
478
+ // Black screen workaround
479
+ player.time = VLCTime(int: Int32(player.time.intValue))
478
480
  }
479
481
 
480
482
  func record(_ path: String?) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-libvlc-player",
3
- "version": "7.0.20",
3
+ "version": "7.0.21",
4
4
  "description": "LibVLC Player for Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",