@simba-dev/react-native-media-player 1.11.0 → 1.12.0

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.
@@ -6,8 +6,7 @@ package com.simba.player
6
6
  * JS) without crossing the Gradle module boundary into the consumer
7
7
  * app's bridge code.
8
8
  *
9
- * Pattern mirrors [IMpvNativePtrProvider] (Phase 7) and
10
- * [IPipModeChangeEmitter] (Phase 10): the consumer app's
9
+ * Pattern mirrors [IPipModeChangeEmitter] (Phase 10): the consumer app's
11
10
  * `MpvBridgeModule` implements this contract; module code looks it up
12
11
  * via `reactContext.getNativeModule("MpvPlayerModule") as?
13
12
  * IMpvConfigProvider` and casts. The cast is safe because we control
@@ -19,10 +18,11 @@ package com.simba.player
19
18
  * Future phases (22-25) extend the lookup to read theme + pip + audio
20
19
  * settings and apply them.
21
20
  *
22
- * Why a separate interface (not extend [IMpvNativePtrProvider]):
23
- * each capability is independently mockable in tests and each fails
24
- * loudly at the cast site if the bridge module ever drops one while
25
- * keeping the other.
21
+ * Why this survives V20 Phase A while its sibling did not: this contract
22
+ * carries data pushed *by React*, so it genuinely needs the React
23
+ * context to reach. The native-pointer contract it used to mirror did
24
+ * not — it carried a process-global, so V20 replaced it with
25
+ * `PlaybackHost`, and it was deleted rather than left as fiction.
26
26
  */
27
27
  interface IMpvConfigProvider {
28
28
  /**
@@ -2,16 +2,13 @@ package com.simba.player
2
2
 
3
3
  /**
4
4
  * Module-side contract that lets `PlayerActivity` (in the module)
5
- emit PiP mode-change events to JS without holding a direct reference
6
- to `MpvBridgeModule` (which lives in the consumer app's
7
- `com.simba.player.mpv` package — Gradle forbids the module from
8
- importing the app).
5
+ * emit PiP mode-change events to JS without holding a direct reference
6
+ * to `MpvBridgeModule`.
9
7
  *
10
- * Pattern mirrors [IMpvNativePtrProvider] (Phase 7): the consumer
11
- * app's bridge module implements this contract; module code looks it up
12
- * via `reactContext.getNativeModule("MpvPlayerModule") as?
13
- * IPipModeChangeEmitter` and casts. The cast is safe because we
14
- * control both sides of the boundary.
8
+ * The consumer app's bridge module implements this contract; module code
9
+ * looks it up via `reactContext.getNativeModule("MpvPlayerModule") as?
10
+ * IPipModeChangeEmitter` and casts. The cast is safe because we control
11
+ * both sides.
15
12
  *
16
13
  * Phase 10 deliverable: `PlayerActivity.onPictureInPictureModeChanged`
17
14
  * looks up the bridge module and calls [emitPictureInPictureModeChanged]
@@ -19,13 +16,10 @@ package com.simba.player
19
16
  * (where `MainActivity.onPictureInPictureModeChanged` called
20
17
  * `MpvBridgeModule.onPictureInPictureModeChanged(isInPip)` directly).
21
18
  *
22
- * Why a separate interface (not extend [IMpvNativePtrProvider]):
23
- * `IMpvNativePtrProvider` is a single-method contract focused on the
24
- * mpv native handle. PiP mode changes are a distinct capability with
25
- * its own event payload (`isInPip: Boolean`). Keeping the contracts
26
- * separate means each is independently mockable in tests and each
27
- * fails loudly at the cast site if the bridge module ever drops one
28
- * capability while keeping the other.
19
+ * Unlike the native-pointer contract this once mirrored, this one
20
+ * genuinely needs the React context - it exists to deliver an event
21
+ * *to JS*. That is why it survives V20 Phase A while that one was
22
+ * deleted and replaced by `PlaybackHost`.
29
23
  */
30
24
  interface IPipModeChangeEmitter {
31
25
  /**