expo-libvlc-player 7.0.34 → 7.0.35

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.
@@ -60,7 +60,6 @@ class LibVlcPlayerModule : Module() {
60
60
  }
61
61
 
62
62
  OnActivityEntersBackground {
63
- MediaPlayerManager.keepAwakeManager.deactivateKeepAwake()
64
63
  MediaPlayerManager.onModuleBackground()
65
64
  }
66
65
 
@@ -17,7 +17,7 @@ class KeepAwakeManager(
17
17
  view.mediaPlayer?.isPlaying() == true
18
18
  }
19
19
 
20
- fun activateKeepAwake() {
20
+ private fun activateKeepAwake() {
21
21
  activity.let { activity ->
22
22
  activity.runOnUiThread {
23
23
  activity.window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
@@ -25,7 +25,7 @@ class KeepAwakeManager(
25
25
  }
26
26
  }
27
27
 
28
- fun deactivateKeepAwake() {
28
+ private fun deactivateKeepAwake() {
29
29
  activity.let { activity ->
30
30
  activity.runOnUiThread {
31
31
  activity.window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
@@ -41,7 +41,6 @@ public class LibVlcPlayerModule: Module {
41
41
  }
42
42
 
43
43
  OnAppEntersBackground {
44
- MediaPlayerManager.shared.keepAwakeManager.deactivateKeepAwake()
45
44
  MediaPlayerManager.shared.onModuleBackground()
46
45
  }
47
46
 
@@ -51,10 +51,12 @@ class AudioSessionManager {
51
51
  }
52
52
  }
53
53
 
54
- do {
55
- try audioSession.setActive(anyPlayingView || doNotMixOverride)
56
- } catch {
57
- log.warn("Failed to set the audio session")
54
+ if anyPlayingView || doNotMixOverride {
55
+ do {
56
+ try audioSession.setActive(true)
57
+ } catch {
58
+ log.warn("Failed to set the audio session")
59
+ }
58
60
  }
59
61
  }
60
62
 
@@ -3,13 +3,13 @@ class KeepAwakeManager {
3
3
 
4
4
  private lazy var expoViews = MediaPlayerManager.shared.expoViews
5
5
 
6
- func activateKeepAwake() {
6
+ private func activateKeepAwake() {
7
7
  DispatchQueue.main.async {
8
8
  UIApplication.shared.isIdleTimerDisabled = true
9
9
  }
10
10
  }
11
11
 
12
- func deactivateKeepAwake() {
12
+ private func deactivateKeepAwake() {
13
13
  DispatchQueue.main.async {
14
14
  UIApplication.shared.isIdleTimerDisabled = false
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-libvlc-player",
3
- "version": "7.0.34",
3
+ "version": "7.0.35",
4
4
  "description": "LibVLC Player for Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",