@stefanmartin/expo-video-watermark 0.2.1 → 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.
@@ -1,58 +1,30 @@
1
- apply plugin: 'com.android.library'
1
+ plugins {
2
+ id 'com.android.library'
3
+ id 'expo-module-gradle-plugin'
4
+ }
2
5
 
3
6
  group = 'expo.modules.videowatermark'
4
- version = '0.1.0'
5
-
6
- def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
7
- apply from: expoModulesCorePlugin
8
- applyKotlinExpoModulesCorePlugin()
9
- useCoreDependencies()
10
- useExpoPublishing()
11
-
12
- // If you want to use the managed Android SDK versions from expo-modules-core, set this to true.
13
- // The Android SDK versions will be bumped from time to time in SDK releases and may introduce breaking changes in your module code.
14
- // Most of the time, you may like to manage the Android SDK versions yourself.
15
- def useManagedAndroidSdkVersions = false
16
- if (useManagedAndroidSdkVersions) {
17
- useDefaultAndroidSdkVersions()
18
- } else {
19
- buildscript {
20
- // Simple helper that allows the root project to override versions declared by this library.
21
- ext.safeExtGet = { prop, fallback ->
22
- rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
23
- }
24
- }
25
- project.android {
26
- compileSdkVersion safeExtGet("compileSdkVersion", 36)
27
- defaultConfig {
28
- minSdkVersion safeExtGet("minSdkVersion", 33)
29
- targetSdkVersion safeExtGet("targetSdkVersion", 36)
30
- }
31
- }
32
- }
7
+ version = '0.2.1'
33
8
 
34
9
  android {
35
10
  namespace "expo.modules.videowatermark"
36
11
  defaultConfig {
37
- versionCode 1
38
- versionName "0.1.0"
12
+ versionCode 2
13
+ versionName "0.2.1"
39
14
  }
40
15
  lintOptions {
41
16
  abortOnError false
42
17
  }
43
-
44
- // Media3 Transformer + effect dependencies for watermarking (replacing FFmpeg)
45
18
  }
46
19
 
47
20
  dependencies {
48
21
  def media3_version = "1.9.1"
49
22
 
50
- // Core Editing & Transformation (What you have, updated)
51
- implementation "androidx.media3:media3-transformer:$media3_version"
52
- implementation "androidx.media3:media3-effect:$media3_version"
53
- implementation "androidx.media3:media3-common-ktx:$media3_version"
23
+ // Core Editing & Transformation
24
+ api "androidx.media3:media3-transformer:$media3_version"
25
+ api "androidx.media3:media3-effect:$media3_version"
26
+ api "androidx.media3:media3-common:$media3_version"
54
27
 
55
- // Recommended for API 33+ Workflows:
56
- implementation "androidx.media3:media3-exoplayer:$media3_version" // For real-time preview
57
- implementation "androidx.media3:media3-muxer:$media3_version" // High-performance MP4/fragmented MP4 output
28
+ // Required for MP4 output
29
+ api "androidx.media3:media3-muxer:$media3_version"
58
30
  }
@@ -12,6 +12,7 @@ import androidx.media3.common.util.UnstableApi
12
12
  import androidx.media3.effect.BitmapOverlay
13
13
  import androidx.media3.effect.OverlayEffect
14
14
  import androidx.media3.effect.OverlaySettings
15
+ import androidx.media3.effect.TextureOverlay
15
16
  import androidx.media3.transformer.Composition
16
17
  import androidx.media3.transformer.EditedMediaItem
17
18
  import androidx.media3.transformer.Effects
@@ -111,14 +112,14 @@ class ExpoVideoWatermarkModule : Module() {
111
112
  .setBackgroundFrameAnchor(0f, -1f) // Position at very bottom of video
112
113
  .build()
113
114
 
114
- // Create the bitmap overlay
115
+ // Create the bitmap overlay with settings
115
116
  val bitmapOverlay = BitmapOverlay.createStaticBitmapOverlay(
116
117
  watermarkBitmap,
117
118
  overlaySettings
118
119
  )
119
120
 
120
- // Create overlay effect
121
- val overlayEffect = OverlayEffect(ImmutableList.of(bitmapOverlay))
121
+ // Create overlay effect with proper typing
122
+ val overlayEffect = OverlayEffect(ImmutableList.of<TextureOverlay>(bitmapOverlay))
122
123
 
123
124
  // Create effects with video overlay
124
125
  val effects = Effects(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stefanmartin/expo-video-watermark",
3
- "version": "0.2.1",
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",