@stefanmartin/expo-video-watermark 0.4.3 → 0.4.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.
@@ -349,8 +349,13 @@ class ExpoVideoWatermarkModule : Module() {
349
349
  // Build composition with HDR mode if needed
350
350
  val compositionBuilder = Composition.Builder(listOf(sequence))
351
351
  if (isHdr) {
352
- Log.d(TAG, "[Step 14b] HDR video detected. Applying tone-mapping to composition.")
353
- compositionBuilder.setHdrMode(Composition.HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC)
352
+ // Use OpenGL-based tone-mapping instead of MediaCodec-based
353
+ // MediaCodec tone-mapping (HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC) is not
354
+ // widely supported and fails with ERROR_CODE_DECODING_FORMAT_UNSUPPORTED on many
355
+ // devices (e.g., Pixel 8 Pro with Exynos HEVC decoder). OpenGL tone-mapping is
356
+ // more compatible as it uses shader-based processing.
357
+ Log.d(TAG, "[Step 14b] HDR video detected. Applying OpenGL-based tone-mapping to composition.")
358
+ compositionBuilder.setHdrMode(Composition.HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_OPEN_GL)
354
359
  } else {
355
360
  Log.d(TAG, "[Step 14b] SDR video detected. No tone-mapping needed.")
356
361
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stefanmartin/expo-video-watermark",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Creating video watermarks on locally stored videos",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",