@simba-dev/react-native-media-player 3.0.3 → 3.0.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.
@@ -141,11 +141,12 @@ export interface PlaylistEntry {
141
141
  * `usePlayerProgress()` is separate from `usePlayer()` so consumers
142
142
  * that only need position/duration don't re-render on every
143
143
  * `onPropertyChanged('volume')` etc. The provider updates the
144
- * progress context from the native mpv event stream — position and
145
- * duration arrive on the property events (4 Hz after native
146
- * coalescing), and `isBuffering` / `isSeeking` / `seekable` /
147
- * `cacheRanges` / `cacheFill` each have their own dedicated event —
148
- * plus a one-shot hydration read at mount.
144
+ * progress context from the native mpv event stream — position arrives
145
+ * on the `time-pos` property event, coalesced natively at 250 ms (4 Hz),
146
+ * while duration arrives on the `duration` property event, which is NOT
147
+ * coalesced and is forwarded as it arrives — and `isBuffering` /
148
+ * `isSeeking` / `seekable` / `cacheRanges` / `cacheFill` each have their
149
+ * own dedicated event — plus a one-shot hydration read at mount.
149
150
  */
150
151
  export interface PlayerProgress {
151
152
  // ── V12 surface (preserved) ───────────────────────────────────────────
@@ -169,6 +170,11 @@ export interface PlayerProgress {
169
170
  * native bridge converts, because it is the only layer that knows which
170
171
  * unit a payload carried.
171
172
  *
173
+ * The published boundaries are SNAPPED to the grid the scrub bar is
174
+ * drawn at — the timeline cut into `durationMs / 1000` cells, or a fixed
175
+ * one-second grid when the duration is unknown — so the values are a
176
+ * rounded grid, not raw mpv readings.
177
+ *
172
178
  * Empty when the source exposes no time-space cache information. A byte
173
179
  * offset is NOT a time and is never reported here: a range painted from
174
180
  * byte offsets would claim that unbuffered data is buffered.
@@ -919,7 +925,7 @@ export function usePlayer(): UsePlayerResult {
919
925
  * volume / track / chapter change.
920
926
  *
921
927
  * The provider updates the progress context only on:
922
- * - the native mpv event stream (position, duration, volume, …)
928
+ * - the native mpv event stream (position, duration, …)
923
929
  * - `onBuffering` / `onSeeking` / `onSeekable` / `onCacheState` /
924
930
  * `onCacheFill` events
925
931
  * - a one-shot hydration read at mount
@@ -1473,6 +1479,7 @@ export function applyPlayerEvent(
1473
1479
  case 'onPipPlayPause':
1474
1480
  case 'onPipExpand':
1475
1481
  case 'onPipClose':
1482
+ case 'onUserLeaveHint':
1476
1483
  // No state-field mapping for these in the V13 surface (PiP state
1477
1484
  // is owned by the activity; reconfig signals a video-parameter
1478
1485
  // change that's already covered by onVideoParamsChanged).
package/tsconfig.json CHANGED
@@ -11,7 +11,6 @@
11
11
  "**/node_modules",
12
12
  "android",
13
13
  "**/*.test.ts",
14
- "**/*.test.tsx",
15
- "src/README.example.tsx"
14
+ "**/*.test.tsx"
16
15
  ]
17
16
  }