@granite-js/video 2.5.4 → 2.5.5

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
@@ -1,5 +1,11 @@
1
1
  # @granite-js/video
2
2
 
3
+ ## 2.5.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 6d8b2b2: Keep the Android video player alive across window detach. `GraniteVideoView.onDetachedFromWindow` released the provider, but a detached view can be attached to a window again — for example when a navigator returns to a screen whose views it had removed — and the provider is only created in `init`. The reattached view was left without a provider, so the video area stayed black and no playback command reached the player. The view now releases only from `GraniteVideoViewManager.onDropViewInstance`, which React Native calls when it actually drops the view.
8
+
3
9
  ## 2.5.4
4
10
 
5
11
  ## 2.5.3
@@ -494,14 +494,13 @@ class GraniteVideoView @JvmOverloads constructor(
494
494
  provider = null
495
495
  }
496
496
 
497
+ /**
498
+ * Must not be called on window detach: a detached view can be attached again,
499
+ * and the provider is only created in init.
500
+ */
497
501
  fun release() {
498
502
  releaseProvider()
499
503
  }
500
-
501
- override fun onDetachedFromWindow() {
502
- super.onDetachedFromWindow()
503
- release()
504
- }
505
504
  }
506
505
 
507
506
  // Event Listener Interface
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@granite-js/video",
3
- "version": "2.5.4",
3
+ "version": "2.5.5",
4
4
  "description": "Pluggable video component for React Native with provider selection",
5
5
  "type": "module",
6
6
  "main": "./dist/module/index.js",