expo-video-thumbnails 9.0.0 → 9.0.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.
- package/CHANGELOG.md +6 -0
- package/android/build.gradle +2 -2
- package/ios/VideoThumbnailsModule.swift +4 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 9.0.1 — 2024-11-12
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- [iOS] Run thumnbnail generation on background thread. ([#32773](https://github.com/expo/expo/pull/32773) by [@alanjhughes](https://github.com/alanjhughes))
|
|
18
|
+
|
|
13
19
|
## 9.0.0 — 2024-10-22
|
|
14
20
|
|
|
15
21
|
### 🛠 Breaking changes
|
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
3
|
group = 'host.exp.exponent'
|
|
4
|
-
version = '9.0.
|
|
4
|
+
version = '9.0.1'
|
|
5
5
|
|
|
6
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
7
7
|
apply from: expoModulesCorePlugin
|
|
@@ -14,7 +14,7 @@ android {
|
|
|
14
14
|
namespace "expo.modules.videothumbnails"
|
|
15
15
|
defaultConfig {
|
|
16
16
|
versionCode 14
|
|
17
|
-
versionName '9.0.
|
|
17
|
+
versionName '9.0.1'
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -7,7 +7,7 @@ public class VideoThumbnailsModule: Module {
|
|
|
7
7
|
public func definition() -> ModuleDefinition {
|
|
8
8
|
Name("ExpoVideoThumbnails")
|
|
9
9
|
|
|
10
|
-
AsyncFunction("getThumbnail", getVideoThumbnail)
|
|
10
|
+
AsyncFunction("getThumbnail", getVideoThumbnail)
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
internal func getVideoThumbnail(sourceFilename: URL, options: VideoThumbnailsOptions) throws -> [String: Any] {
|
|
@@ -17,8 +17,8 @@ public class VideoThumbnailsModule: Module {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
let asset = AVURLAsset
|
|
21
|
-
let generator = AVAssetImageGenerator
|
|
20
|
+
let asset = AVURLAsset(url: sourceFilename, options: ["AVURLAssetHTTPHeaderFieldsKey": options.headers])
|
|
21
|
+
let generator = AVAssetImageGenerator(asset: asset)
|
|
22
22
|
|
|
23
23
|
generator.appliesPreferredTrackTransform = true
|
|
24
24
|
generator.requestedTimeToleranceAfter = CMTime.zero
|
|
@@ -32,7 +32,7 @@ public class VideoThumbnailsModule: Module {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
let imgRef = try generator.copyCGImage(at: time, actualTime: nil)
|
|
35
|
-
let thumbnail = UIImage
|
|
35
|
+
let thumbnail = UIImage(cgImage: imgRef)
|
|
36
36
|
let savedImageUrl = try saveImage(image: thumbnail, quality: options.quality)
|
|
37
37
|
|
|
38
38
|
return [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-video-thumbnails",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"description": "Provides function that let you generate an image from video.",
|
|
5
5
|
"main": "build/VideoThumbnails.js",
|
|
6
6
|
"types": "build/VideoThumbnails.d.ts",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"expo": "*"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "68c2c4f5a536c4eb7db9551188c7f667d9fa53c8"
|
|
43
43
|
}
|