expo-libvlc-player 7.0.29 → 7.0.30

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.
@@ -300,17 +300,14 @@ class LibVlcPlayerView: ExpoView {
300
300
 
301
301
  func resetVideoTrack() {
302
302
  guard let player = mediaPlayer,
303
- let videoTrack = player.videoTracks.first(where: { track in track.isSelected }),
304
- !player.isPlaying
303
+ let videoTrack = player.videoTracks.first(where: { track in track.isSelected })
305
304
  else { return }
306
305
 
307
306
  videoTrack.isSelected = false
308
307
  videoTrack.isSelectedExclusively = true
309
308
 
310
309
  // Black screen workaround
311
- DispatchQueue.main.async {
312
- player.time = VLCTime(int: player.time.intValue)
313
- }
310
+ player.time = VLCTime(int: player.time.intValue)
314
311
  }
315
312
 
316
313
  var hasVideoSize: Bool {
@@ -452,10 +449,7 @@ class LibVlcPlayerView: ExpoView {
452
449
  }
453
450
 
454
451
  func pauseReset() {
455
- if !pictureInPicture {
456
- mediaPlayer?.pause()
457
- }
458
-
452
+ mediaPlayer?.pause()
459
453
  resetVideoTrack()
460
454
  }
461
455
 
@@ -542,7 +536,9 @@ class LibVlcPlayerView: ExpoView {
542
536
  }
543
537
 
544
538
  func onStopPictureInPicture() {
545
- resetVideoTrack()
539
+ if mediaPlayer?.isPlaying == false {
540
+ resetVideoTrack()
541
+ }
546
542
  onPictureInPictureStop()
547
543
  }
548
544
 
@@ -32,7 +32,10 @@ class MediaPlayerManager {
32
32
  func onModuleBackground() {
33
33
  for view in expoViews.allObjects {
34
34
  view.onBackground()
35
- view.pauseReset()
35
+
36
+ if !view.pictureInPicture {
37
+ view.pauseReset()
38
+ }
36
39
  }
37
40
  }
38
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-libvlc-player",
3
- "version": "7.0.29",
3
+ "version": "7.0.30",
4
4
  "description": "LibVLC Player for Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",