@simba-dev/react-native-media-player 1.5.11 → 1.5.13

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.
@@ -1935,6 +1935,36 @@ class MpvBridgeModule(reactContext: ReactApplicationContext) :
1935
1935
  CacheStatePayload(emptyList(), 0.0)
1936
1936
  }
1937
1937
  }
1938
+
1939
+ /**
1940
+ * T28.03: stable integer mapping for the structured error codes emitted
1941
+ * by [emitErrorEvent]. The TS `onError` interface declares `code: number`
1942
+ * - this helper provides the integer so programmatic handlers can switch
1943
+ * on a stable value across versions. Numeric codes are PERMANENT: do
1944
+ * not reuse a number once it ships (use a new range instead). Ranges:
1945
+ *
1946
+ * 1xxx - Initialization lifecycle (mount order, warm-up, ensurePtr)
1947
+ * 2xxx - Activity / Intent / launch failures (PlayerActivity missing,
1948
+ * SecurityException, manifest mismatches)
1949
+ * 3xxx - Playback control errors (loadFile failures, command queue
1950
+ * overflow, seek out-of-range) - reserved for future use
1951
+ * 4xxx - Configuration / IPC errors (setConfig parse failures,
1952
+ * bridge serialisation mismatches)
1953
+ *
1954
+ * Returns `0` for unknown codes so unrecognised values degrade to
1955
+ * a single sentinel rather than throwing.
1956
+ */
1957
+ private fun codeToNumeric(code: String): Int = when (code) {
1958
+ // 1xxx - Initialization
1959
+ "E_NOT_INITIALIZED" -> 1001
1960
+ // 2xxx - Activity / Intent / launch
1961
+ "E_ACTIVITY_NOT_FOUND" -> 2001
1962
+ "E_SECURITY" -> 2002
1963
+ "E_OPEN_PLAYER_FAILED" -> 2003
1964
+ // 4xxx - Configuration
1965
+ "E_CONFIG_PARSE_FAILED" -> 4001
1966
+ else -> 0
1967
+ }
1938
1968
  }
1939
1969
 
1940
1970
  /**
@@ -1970,34 +2000,4 @@ internal object JsonUtil {
1970
2000
  }
1971
2001
  return map
1972
2002
  }
1973
-
1974
- /**
1975
- * T28.03: stable integer mapping for the structured error codes emitted
1976
- * by [emitErrorEvent]. The TS `onError` interface declares `code: number`
1977
- * — this helper provides the integer so programmatic handlers can switch
1978
- * on a stable value across versions. Numeric codes are PERMANENT: do
1979
- * not reuse a number once it ships (use a new range instead). Ranges:
1980
- *
1981
- * 1xxx — Initialization lifecycle (mount order, warm-up, ensurePtr)
1982
- * 2xxx — Activity / Intent / launch failures (PlayerActivity missing,
1983
- * SecurityException, manifest mismatches)
1984
- * 3xxx — Playback control errors (loadFile failures, command queue
1985
- * overflow, seek out-of-range) — reserved for future use
1986
- * 4xxx — Configuration / IPC errors (setConfig parse failures,
1987
- * bridge serialisation mismatches)
1988
- *
1989
- * Returns `0` for unknown codes so unrecognised values degrade to
1990
- * a single sentinel rather than throwing.
1991
- */
1992
- private fun codeToNumeric(code: String): Int = when (code) {
1993
- // 1xxx — Initialization
1994
- "E_NOT_INITIALIZED" -> 1001
1995
- // 2xxx — Activity / Intent / launch
1996
- "E_ACTIVITY_NOT_FOUND" -> 2001
1997
- "E_SECURITY" -> 2002
1998
- "E_OPEN_PLAYER_FAILED" -> 2003
1999
- // 4xxx — Configuration
2000
- "E_CONFIG_PARSE_FAILED" -> 4001
2001
- else -> 0
2002
- }
2003
2003
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simba-dev/react-native-media-player",
3
- "version": "1.5.11",
3
+ "version": "1.5.13",
4
4
  "description": "React Native video/audio player powered by libmpv — Picture-in-Picture, MediaSession, custom RN UI. **V16.0.8 patch release** (2026-09-14) — D-033 16 KB page-size alignment: add_link_options(\"-Wl,-z,max-page-size=16384 -Wl,-z,common-page-size=16384\") in CMakeLists.txt + ndkVersion r27+ so libsimbaplayer_mpv.so's LOAD segments are aligned to 16 KB (Android 14+ 16 KB page-size requirement). Without this, libsimbaplayer_mpv.so shows \"LOAD segment not aligned\" in the Android App Compatibility dialog and Android refuses to load it — which cascades to \"Unknown error\" for libmpv.so, libc++_shared.so, libav*.so (all transitively loaded via libsimbaplayer_mpv.so's NEEDED list), and the app boots to a white screen. v1.5.7 pre-load attempt was insufficient because the libs themselves weren't loading at all. See CHANGELOG.md for details.",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",