@imgly/editor-react-native 1.79.0 → 1.80.0-rc.1

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.
@@ -143,7 +143,7 @@ repositories {
143
143
  }
144
144
 
145
145
  dependencies {
146
- api "ly.img:editor:1.79.0"
146
+ api "ly.img:editor:1.80.0-rc.1"
147
147
 
148
148
  implementation "androidx.activity:activity-ktx:1.9.0"
149
149
  implementation "androidx.appcompat:appcompat:1.7.1"
@@ -3,7 +3,9 @@ package ly.img.editor.configuration.video.callback
3
3
  import kotlinx.coroutines.CancellationException
4
4
  import ly.img.editor.configuration.video.VideoConfigurationBuilder
5
5
  import ly.img.editor.configuration.video.model.ExportStatus
6
+ import ly.img.engine.ExportVideoOptions
6
7
  import ly.img.engine.MimeType
8
+ import ly.img.engine.VideoBitrate
7
9
  import java.nio.ByteBuffer
8
10
 
9
11
  /**
@@ -63,6 +65,8 @@ suspend fun VideoConfigurationBuilder.onExportByteBuffer(): ByteBuffer {
63
65
  exportStatus = ExportStatus.Loading(progress = newProgress)
64
66
  }
65
67
  },
68
+ // videoBitrate: VideoBitrate.Auto derives a bounded bitrate from the resolution/framerate.
69
+ options = ExportVideoOptions(videoBitrate = VideoBitrate.Auto),
66
70
  )
67
71
  }
68
72
  // highlight-starter-kit-on-export-byte-buffer
@@ -435,7 +435,7 @@ object EditorBuilderDefaults {
435
435
  }
436
436
 
437
437
  private suspend fun saveScene(scene: String): Uri = withContext(Dispatchers.IO) {
438
- val file = File.createTempFile("cesdk_export_scene_" + UUID.randomUUID().toString(), ".scene")
438
+ val file = File.createTempFile("cesdk_export_scene_" + UUID.randomUUID().toString(), ".imgly")
439
439
  file.writeText(scene)
440
440
  Uri.fromFile(file)
441
441
  }
@@ -7,7 +7,7 @@ import android.os.Parcelable
7
7
  enum class EditorSourceType(
8
8
  val value: String,
9
9
  ) : Parcelable {
10
- /** A `.scene` file. */
10
+ /** A scene file (`.imgly` or the legacy `.scene`). */
11
11
  SCENE("scene"),
12
12
 
13
13
  /** An image file, e.g. `.png`. */
@@ -22,7 +22,9 @@ class ExportHelper {
22
22
  /// - Returns: The file `URL`.
23
23
  func saveScene(_ scene: String) throws -> URL? {
24
24
  let fileName = "cesdk_export_scene_" + UUID().uuidString
25
- let url = FileManager.default.temporaryDirectory.appendingPathComponent(fileName, conformingTo: .plainText)
25
+ let url = FileManager.default.temporaryDirectory
26
+ .appendingPathComponent(fileName)
27
+ .appendingPathExtension("imgly")
26
28
  if let data = scene.data(using: .utf8) {
27
29
  try data.write(to: url, options: [.atomic])
28
30
  return url
@@ -16,7 +16,12 @@ extension VideoEditorConfiguration {
16
16
  }
17
17
  eventHandler.send(.exportProgress(.relative(0)))
18
18
  let mimeType: MIMEType = .mp4
19
- let stream = try await engine.block.exportVideo(page, mimeType: mimeType) { _ in }
19
+ // videoBitrate: .auto derives a bounded bitrate from the resolution/framerate.
20
+ let stream = try await engine.block.exportVideo(
21
+ page,
22
+ mimeType: mimeType,
23
+ options: VideoExportOptions(videoBitrate: .auto),
24
+ ) { _ in }
20
25
 
21
26
  var lastReportedProgress = 0
22
27
  for try await export in stream {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imgly/editor-react-native",
3
- "version": "1.79.0",
3
+ "version": "1.80.0-rc.1",
4
4
  "description": "CreativeEditor SDK for React Native - enable photo, video and design editing for your users on iOS and Android.",
5
5
  "react-native": "index.js",
6
6
  "source": "index.js",
@@ -96,7 +96,7 @@ export class EditorSettingsModel implements EditorSettings {
96
96
  * sources (stickers, filters, and more).
97
97
  */
98
98
  baseUri: string =
99
- 'https://cdn.img.ly/packages/imgly/cesdk-react-native/1.79.0/assets';
99
+ 'https://cdn.img.ly/packages/imgly/cesdk-react-native/1.80.0-rc.1/assets';
100
100
 
101
101
  /**
102
102
  * Unique ID tied to your application's user.
@@ -115,7 +115,7 @@ export class EditorSettingsModel implements EditorSettings {
115
115
  * loaded into the editor.
116
116
  */
117
117
  export enum SourceType {
118
- /** A `.scene` file. */
118
+ /** A scene file (`.imgly` or the legacy `.scene`). */
119
119
  SCENE = 'scene',
120
120
 
121
121
  /** An image, e.g. `.png`. */