react-native-tpstreams 1.1.8-dev.1 → 1.1.8-dev.3
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.
|
@@ -42,13 +42,6 @@ class TPStreamsRNPlayerView(context: ThemedReactContext) : FrameLayout(context)
|
|
|
42
42
|
addView(playerView, LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT))
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
override fun onAttachedToWindow() {
|
|
46
|
-
super.onAttachedToWindow()
|
|
47
|
-
player?.let { p ->
|
|
48
|
-
playerView.player = p
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
45
|
override fun requestLayout() {
|
|
53
46
|
super.requestLayout()
|
|
54
47
|
if (!isLayoutUpdatePosted) {
|
|
@@ -265,12 +258,11 @@ class TPStreamsRNPlayerView(context: ThemedReactContext) : FrameLayout(context)
|
|
|
265
258
|
|
|
266
259
|
override fun onDetachedFromWindow() {
|
|
267
260
|
super.onDetachedFromWindow()
|
|
268
|
-
|
|
261
|
+
player?.pause()
|
|
269
262
|
}
|
|
270
263
|
|
|
271
264
|
fun releasePlayer() {
|
|
272
265
|
try {
|
|
273
|
-
playerView.player = null
|
|
274
266
|
player?.release()
|
|
275
267
|
} catch (e: Exception) {
|
|
276
268
|
Log.e("TPStreamsRN", "Error releasing player", e)
|