react-native-spalla-player 0.12.3 → 0.12.4
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/android/build.gradle
CHANGED
|
@@ -104,7 +104,7 @@ dependencies {
|
|
|
104
104
|
implementation "com.facebook.react:react-native:+"
|
|
105
105
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
106
106
|
implementation "androidx.mediarouter:mediarouter:1.2.0"
|
|
107
|
-
implementation "stream.spalla:spalla-android-sdk:1.9.
|
|
107
|
+
implementation "stream.spalla:spalla-android-sdk:1.9.3"
|
|
108
108
|
implementation "com.google.android.gms:play-services-cast-framework:21.3.0"
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -28,6 +28,7 @@ class RNSpallaPlayerManager() : SimpleViewManager<SpallaPlayerView>(), SpallaPla
|
|
|
28
28
|
private var subtitle: String? = null
|
|
29
29
|
private var loadTimer: Timer? = null
|
|
30
30
|
private var playbackRate: Double = 1.0
|
|
31
|
+
private var hideUI: Boolean? = null
|
|
31
32
|
|
|
32
33
|
override fun getName() = "RNSpallaPlayer"
|
|
33
34
|
|
|
@@ -94,9 +95,15 @@ class RNSpallaPlayerManager() : SimpleViewManager<SpallaPlayerView>(), SpallaPla
|
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
@ReactProp(name = "hideUI")
|
|
99
|
+
fun setPlaybackRate(view: SpallaPlayerView, hideUI: Boolean) {
|
|
100
|
+
this.hideUI = hideUI
|
|
101
|
+
checkAndLoadPlayer(view)
|
|
102
|
+
}
|
|
103
|
+
|
|
97
104
|
private fun checkAndLoadPlayer(view: SpallaPlayerView) {
|
|
98
|
-
if (contentId != null && startTime != null) {
|
|
99
|
-
view.load(contentId!!,
|
|
105
|
+
if (contentId != null && startTime != null && hideUI != null) {
|
|
106
|
+
view.load(contentId!!, true, startTime!!, subtitle, hideUI!!)
|
|
100
107
|
}
|
|
101
108
|
}
|
|
102
109
|
|
|
@@ -111,7 +118,7 @@ class RNSpallaPlayerManager() : SimpleViewManager<SpallaPlayerView>(), SpallaPla
|
|
|
111
118
|
loadTimer?.cancel()
|
|
112
119
|
loadTimer = null
|
|
113
120
|
// Call view.load with the required properties
|
|
114
|
-
view.load(contentId!!,
|
|
121
|
+
view.load(contentId!!, true,startTime!!, subtitle = subtitle, hideUI!!)
|
|
115
122
|
}
|
|
116
123
|
}, 300) // Delay of 200ms to allow all properties to be set
|
|
117
124
|
}
|