@stefanmartin/expo-video-watermark 0.2.2 → 0.2.3

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.
@@ -11,7 +11,7 @@ import androidx.media3.common.MediaItem
11
11
  import androidx.media3.common.util.UnstableApi
12
12
  import androidx.media3.effect.BitmapOverlay
13
13
  import androidx.media3.effect.OverlayEffect
14
- import androidx.media3.effect.OverlayConfiguration
14
+ import androidx.media3.effect.OverlaySettings
15
15
  import androidx.media3.effect.TextureOverlay
16
16
  import androidx.media3.transformer.Composition
17
17
  import androidx.media3.transformer.EditedMediaItem
@@ -103,19 +103,19 @@ class ExpoVideoWatermarkModule : Module() {
103
103
  val watermarkWidth = watermarkBitmap.width.toFloat()
104
104
  val scale = videoWidth / watermarkWidth
105
105
 
106
- // Create overlay configuration for full-width bottom positioning
106
+ // Create overlay settings for full-width bottom positioning
107
107
  // In Media3, coordinates are normalized: (0,0) is center
108
108
  // x range [-1, 1] (left to right), y range [-1, 1] (bottom to top)
109
- val overlayConfiguration = OverlayConfiguration.Builder()
109
+ val overlaySettings = OverlaySettings.Builder()
110
110
  .setScale(scale, scale) // Scale uniformly to match video width
111
- .setOverlayAnchor(0f, -1f) // Anchor at bottom-center of watermark
112
- .setBackgroundAnchor(0f, -1f) // Position at very bottom of video
111
+ .setOverlayFrameAnchor(0f, -1f) // Anchor at bottom-center of watermark
112
+ .setBackgroundFrameAnchor(0f, -1f) // Position at very bottom of video
113
113
  .build()
114
114
 
115
- // Create the bitmap overlay with configuration
115
+ // Create the bitmap overlay with settings
116
116
  val bitmapOverlay = BitmapOverlay.createStaticBitmapOverlay(
117
117
  watermarkBitmap,
118
- overlayConfiguration
118
+ overlaySettings
119
119
  )
120
120
 
121
121
  // Create overlay effect with proper typing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stefanmartin/expo-video-watermark",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Creating video watermarks on locally stored videos",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",