@simba-dev/react-native-media-player 3.4.0 → 3.4.1

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,18 @@
1
1
 
2
2
 
3
+ ## [3.4.1] - 2026-11-21
4
+
5
+ ### Added
6
+
7
+ - **`LaunchParams.headers` — the in-window launch path can carry the request headers too.**
8
+
9
+ `useLaunchPlayback` is the library's own load half, and it is what a consumer that loads
10
+ into an already-open window uses. It had no way to say "fetch this file with these
11
+ headers", so a consumer whose video lane needed them could not pass them at all.
12
+
13
+ The headers ride the LOAD, like every other launch parameter: they are part of the file
14
+ being opened, not a property set before it.
15
+
3
16
  ## [3.4.0] - 2026-11-21
4
17
 
5
18
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simba-dev/react-native-media-player",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "React Native video & audio player powered by libmpv — Picture-in-Picture, MediaSession, foreground service, and a customizable TypeScript UI. Built for Android. Designed as a drop-in replacement for react-native-video / react-native-track-player / expo-av. See CHANGELOG.md for per-version notes.",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -110,6 +110,13 @@ export interface LaunchParams {
110
110
  * `loadFileWithRequestId`, which already exists for the same reason.
111
111
  */
112
112
  readonly requestId?: string;
113
+ /**
114
+ * HTTP request headers to send when fetching THIS file.
115
+ *
116
+ * They are per file: the native side turns them into mpv¤s per-file
117
+ * options, so they apply to this launch and to no later one.
118
+ */
119
+ readonly headers?: Record<string, string>;
113
120
  }
114
121
 
115
122
  /**
@@ -90,7 +90,9 @@ export function useLaunchPlayback(
90
90
  // `loadAndPlay` owns the title-then-load ordering now, shared
91
91
  // with `usePlayerActivity.openPlayer` so the two entry points
92
92
  // cannot drift into loading a file under the wrong title.
93
- loadAndPlay(bridge, {uri, title, startPositionMs});
93
+ // The headers ride the LOAD. They are part of the file being
94
+ // opened, not a property set before it.
95
+ loadAndPlay(bridge, {uri, title, startPositionMs, headers: launchParams?.headers});
94
96
  } catch {
95
97
  // Bridge not present (jest/web) — ignore.
96
98
  }