react-native-theoplayer 3.9.0 → 3.9.2
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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.9.2] - 24-03-06
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Never pause play-out when losing audio focus while playing an advertisement.
|
|
13
|
+
|
|
14
|
+
## [3.9.1] - 24-03-05
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Bumped google-cast-sdk dependency to v4.8.0 for iOS.
|
|
19
|
+
|
|
8
20
|
## [3.9.0] - 24-03-04
|
|
9
21
|
|
|
10
22
|
### Changed
|
|
@@ -93,20 +93,12 @@ class AudioFocusManager(
|
|
|
93
93
|
|
|
94
94
|
// Used to indicate a loss of audio focus of unknown duration.
|
|
95
95
|
AudioManager.AUDIOFOCUS_LOSS -> {
|
|
96
|
-
|
|
97
|
-
// This is not a transient (short) loss, we shouldn't automatically resume for now.
|
|
98
|
-
resumeOnFocusGain = false
|
|
99
|
-
}
|
|
100
|
-
player?.pause()
|
|
96
|
+
onAudioFocusLoss(false)
|
|
101
97
|
}
|
|
102
98
|
|
|
103
99
|
// Used to indicate a transient (short) loss of audio focus.
|
|
104
100
|
AudioManager.AUDIOFOCUS_LOSS_TRANSIENT -> {
|
|
105
|
-
|
|
106
|
-
// We should only resume if playback was interrupted
|
|
107
|
-
resumeOnFocusGain = !(player?.isPaused ?: true)
|
|
108
|
-
}
|
|
109
|
-
player?.pause()
|
|
101
|
+
onAudioFocusLoss(true)
|
|
110
102
|
}
|
|
111
103
|
|
|
112
104
|
// Used to indicate a transient (short) loss of audio focus where the loser of the audio focus
|
|
@@ -123,6 +115,18 @@ class AudioFocusManager(
|
|
|
123
115
|
}
|
|
124
116
|
}
|
|
125
117
|
|
|
118
|
+
private fun onAudioFocusLoss(transient: Boolean) {
|
|
119
|
+
// Don't pause when playing an ad
|
|
120
|
+
if (player?.ads?.isPlaying == true) {
|
|
121
|
+
return
|
|
122
|
+
}
|
|
123
|
+
synchronized(focusLock) {
|
|
124
|
+
// We should only resume if playback was interrupted
|
|
125
|
+
resumeOnFocusGain = transient && !(player?.isPaused ?: true)
|
|
126
|
+
}
|
|
127
|
+
player?.pause()
|
|
128
|
+
}
|
|
129
|
+
|
|
126
130
|
private fun fromAudioFocusChange(focusChange: Int?): String {
|
|
127
131
|
return when (focusChange) {
|
|
128
132
|
AudioManager.AUDIOFOCUS_GAIN -> "AUDIOFOCUS_GAIN"
|
|
@@ -9,15 +9,11 @@ import android.content.IntentFilter
|
|
|
9
9
|
import android.content.pm.PackageManager
|
|
10
10
|
import android.os.Build
|
|
11
11
|
import android.view.View
|
|
12
|
-
import android.view.View.OnLayoutChangeListener
|
|
13
12
|
import android.view.ViewGroup
|
|
14
|
-
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
|
|
15
13
|
import android.view.ViewParent
|
|
16
14
|
import androidx.activity.ComponentActivity
|
|
17
15
|
import androidx.core.view.WindowInsetsCompat
|
|
18
16
|
import androidx.core.view.WindowInsetsControllerCompat
|
|
19
|
-
import androidx.core.view.children
|
|
20
|
-
import androidx.core.view.updateLayoutParams
|
|
21
17
|
import androidx.lifecycle.Lifecycle
|
|
22
18
|
import com.facebook.react.ReactRootView
|
|
23
19
|
import com.facebook.react.uimanager.ThemedReactContext
|
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@ Pod::Spec.new do |s|
|
|
|
22
22
|
s.license = package["license"]
|
|
23
23
|
s.authors = package["author"]
|
|
24
24
|
|
|
25
|
-
s.platforms = { :ios => "
|
|
25
|
+
s.platforms = { :ios => "13.0", :tvos => "13.0" }
|
|
26
26
|
s.source = { :git => "https://www.theoplayer.com/.git", :tag => "#{s.version}" }
|
|
27
27
|
|
|
28
28
|
s.source_files = 'ios/*.{h,m,swift}', 'ios/ads/*.swift', 'ios/casting/*.swift', 'ios/contentprotection/*.swift', 'ios/pip/*.swift', 'ios/backgroundAudio/*.swift', 'ios/cache/*.swift', 'ios/sideloadedMetadata/*.swift', 'ios/eventBroadcasting/*.swift' , 'ios/ui/*.swift', 'ios/presentationMode/*.swift'
|
|
@@ -50,7 +50,7 @@ Pod::Spec.new do |s|
|
|
|
50
50
|
if theofeatures.include?("CHROMECAST")
|
|
51
51
|
puts "Adding THEOplayer-Integration-GoogleCast"
|
|
52
52
|
s.ios.dependency "THEOplayer-Integration-GoogleCast/Base", "~> 6.9"
|
|
53
|
-
s.ios.dependency "
|
|
53
|
+
s.ios.dependency "google-cast-sdk-dynamic-xcframework", "~> 4.8"
|
|
54
54
|
end
|
|
55
55
|
if theofeatures.include?("SIDELOADED_TEXTTRACKS")
|
|
56
56
|
puts "Adding THEOplayer-Connector-SideloadedSubtitle"
|