react-native-tpstreams 1.1.8-dev.3 → 1.1.8-dev.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.
|
@@ -42,6 +42,13 @@ 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
|
+
|
|
45
52
|
override fun requestLayout() {
|
|
46
53
|
super.requestLayout()
|
|
47
54
|
if (!isLayoutUpdatePosted) {
|
|
@@ -258,6 +265,7 @@ class TPStreamsRNPlayerView(context: ThemedReactContext) : FrameLayout(context)
|
|
|
258
265
|
|
|
259
266
|
override fun onDetachedFromWindow() {
|
|
260
267
|
super.onDetachedFromWindow()
|
|
268
|
+
playerView.player = null
|
|
261
269
|
player?.pause()
|
|
262
270
|
}
|
|
263
271
|
|