react-native-compressor 1.7.2 → 1.8.0
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/README.md +30 -7
- package/android/build.gradle +8 -0
- package/android/src/main/java/com/reactnativecompressor/Audio/AudioCompressor.kt +527 -0
- package/android/src/main/java/com/reactnativecompressor/Audio/AudioMain.kt +31 -0
- package/android/src/main/java/com/reactnativecompressor/CompressorModule.kt +157 -0
- package/android/src/main/java/com/reactnativecompressor/CompressorPackage.kt +34 -0
- package/android/src/main/java/com/reactnativecompressor/Image/ImageCompressor.kt +199 -0
- package/android/src/main/java/com/reactnativecompressor/Image/ImageCompressorOptions.kt +57 -0
- package/android/src/main/java/com/reactnativecompressor/Image/ImageMain.kt +31 -0
- package/android/src/main/java/com/reactnativecompressor/Image/ImageSize.kt +3 -0
- package/android/src/main/java/com/reactnativecompressor/Utils/Downloader.kt +119 -0
- package/android/src/main/java/com/reactnativecompressor/Utils/EventEmitterHandler.kt +66 -0
- package/android/src/main/java/com/reactnativecompressor/Utils/MediaCache.kt +61 -0
- package/android/src/main/java/com/reactnativecompressor/Utils/RealPathUtil.kt +177 -0
- package/android/src/main/java/com/reactnativecompressor/Utils/Uploader.kt +117 -0
- package/android/src/main/java/com/reactnativecompressor/Utils/Utils.kt +162 -0
- package/android/src/main/java/com/reactnativecompressor/Video/AutoVideoCompression.kt +63 -0
- package/android/src/main/java/com/reactnativecompressor/Video/VideoCompressorHelper.kt +125 -0
- package/android/src/main/java/com/reactnativecompressor/Video/VideoMain.kt +86 -0
- package/android/src/newarch/CompressorSpec.kt +5 -0
- package/android/src/oldarch/CompressorSpec.kt +32 -0
- package/ios/Audio/AudioMain.swift +115 -0
- package/ios/Compressor-Bridging-Header.h +1 -2
- package/ios/Compressor.h +0 -8
- package/ios/Compressor.mm +28 -389
- package/ios/CompressorManager.swift +96 -0
- package/ios/Image/ImageCompressor.swift +354 -0
- package/ios/Image/ImageCompressorOptions.swift +93 -0
- package/ios/Image/ImageMain.swift +27 -0
- package/ios/Utils/Downloader.swift +157 -0
- package/ios/Utils/EventEmitterHandler.swift +54 -0
- package/ios/Utils/MediaCache.swift +48 -0
- package/ios/Utils/Uploader.swift +99 -0
- package/ios/Utils/Utils.swift +110 -0
- package/ios/Video/{VideoCompressor.swift → VideoMain.swift} +167 -146
- package/lib/commonjs/Image/index.js +1 -1
- package/lib/commonjs/Image/index.js.map +1 -1
- package/lib/commonjs/Main.js +1 -8
- package/lib/commonjs/Main.js.map +1 -1
- package/lib/commonjs/Spec/NativeCompressor.js.map +1 -1
- package/lib/commonjs/Video/index.js +4 -33
- package/lib/commonjs/Video/index.js.map +1 -1
- package/lib/commonjs/expo-plugin/compressor.js.map +1 -1
- package/lib/commonjs/index.js +11 -6
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/Downloader.js +38 -0
- package/lib/commonjs/utils/Downloader.js.map +1 -0
- package/lib/commonjs/utils/Uploader.js +40 -0
- package/lib/commonjs/utils/Uploader.js.map +1 -0
- package/lib/commonjs/utils/index.js +35 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/Image/index.js +1 -1
- package/lib/module/Image/index.js.map +1 -1
- package/lib/module/Main.js +1 -7
- package/lib/module/Main.js.map +1 -1
- package/lib/module/Spec/NativeCompressor.js.map +1 -1
- package/lib/module/Video/index.js +5 -33
- package/lib/module/Video/index.js.map +1 -1
- package/lib/module/expo-plugin/compressor.js.map +1 -1
- package/lib/module/index.js +6 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/Downloader.js +31 -0
- package/lib/module/utils/Downloader.js.map +1 -0
- package/lib/module/utils/Uploader.js +33 -0
- package/lib/module/utils/Uploader.js.map +1 -0
- package/lib/module/utils/index.js +2 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/Image/index.d.ts +4 -0
- package/lib/typescript/Image/index.d.ts.map +1 -1
- package/lib/typescript/Main.d.ts +1 -2
- package/lib/typescript/Main.d.ts.map +1 -1
- package/lib/typescript/Spec/NativeCompressor.d.ts +8 -2
- package/lib/typescript/Spec/NativeCompressor.d.ts.map +1 -1
- package/lib/typescript/Video/index.d.ts +4 -28
- package/lib/typescript/Video/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +5 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/utils/Downloader.d.ts +2 -0
- package/lib/typescript/utils/Downloader.d.ts.map +1 -0
- package/lib/typescript/utils/Uploader.d.ts +28 -0
- package/lib/typescript/utils/Uploader.d.ts.map +1 -0
- package/lib/typescript/utils/index.d.ts +2 -1
- package/lib/typescript/utils/index.d.ts.map +1 -1
- package/package.json +6 -4
- package/src/Image/index.tsx +5 -1
- package/src/Main.tsx +1 -15
- package/src/Spec/NativeCompressor.ts +14 -2
- package/src/Video/index.tsx +11 -84
- package/src/expo-plugin/compressor.ts +1 -1
- package/src/index.tsx +6 -3
- package/src/utils/Downloader.tsx +38 -0
- package/src/utils/Uploader.tsx +78 -0
- package/src/utils/index.tsx +2 -0
- package/android/src/main/java/com/reactnativecompressor/Audio/AudioCompressor.java +0 -605
- package/android/src/main/java/com/reactnativecompressor/CompressorModule.java +0 -220
- package/android/src/main/java/com/reactnativecompressor/CompressorPackage.java +0 -58
- package/android/src/main/java/com/reactnativecompressor/Image/ImageCompressor.java +0 -257
- package/android/src/main/java/com/reactnativecompressor/Image/utils/ImageCompressorOptions.java +0 -69
- package/android/src/main/java/com/reactnativecompressor/Image/utils/ImageSize.java +0 -13
- package/android/src/main/java/com/reactnativecompressor/Utils/FileUplaoder/FileUploadHelper.java +0 -39
- package/android/src/main/java/com/reactnativecompressor/Utils/FileUplaoder/FileUploader.java +0 -129
- package/android/src/main/java/com/reactnativecompressor/Utils/MediaCache.java +0 -65
- package/android/src/main/java/com/reactnativecompressor/Utils/RealPathUtil.java +0 -210
- package/android/src/main/java/com/reactnativecompressor/Utils/Utils.java +0 -272
- package/android/src/main/java/com/reactnativecompressor/Video/AutoVideoCompression/AutoVideoCompression.java +0 -87
- package/android/src/main/java/com/reactnativecompressor/Video/VideoCompressorHelper.java +0 -182
- package/android/src/main/java/com/reactnativecompressor/Video/VideoModule.java +0 -112
- package/android/src/newarch/CompressorSpec.java +0 -9
- package/android/src/newarch/VideoCompressorSpec.java +0 -9
- package/android/src/oldarch/CompressorSpec.java +0 -34
- package/android/src/oldarch/VideoCompressorSpec.java +0 -26
- package/ios/Image/ImageCompressor.h +0 -22
- package/ios/Image/ImageCompressor.m +0 -540
- package/ios/Image/ImageCompressorOptions.h +0 -28
- package/ios/Image/ImageCompressorOptions.m +0 -97
- package/ios/Utils/Downloader.h +0 -16
- package/ios/Utils/Downloader.m +0 -150
- package/ios/Utils/MediaCache.h +0 -11
- package/ios/Utils/MediaCache.m +0 -51
- package/ios/Video/VideoCompressor.h +0 -5
- package/ios/Video/VideoCompressor.m +0 -1
- package/lib/commonjs/Spec/NativeVideoCompressor.js +0 -10
- package/lib/commonjs/Spec/NativeVideoCompressor.js.map +0 -1
- package/lib/module/Spec/NativeVideoCompressor.js +0 -3
- package/lib/module/Spec/NativeVideoCompressor.js.map +0 -1
- package/lib/typescript/Spec/NativeVideoCompressor.d.ts +0 -13
- package/lib/typescript/Spec/NativeVideoCompressor.d.ts.map +0 -1
- package/src/Spec/NativeVideoCompressor.ts +0 -14
package/ios/Utils/Downloader.m
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
#import "Downloader.h"
|
|
2
|
-
|
|
3
|
-
@implementation Downloader
|
|
4
|
-
|
|
5
|
-
NSURLSession* _session;
|
|
6
|
-
NSURLSessionDownloadTask* _task;
|
|
7
|
-
NSNumber* _statusCode;
|
|
8
|
-
NSTimeInterval _lastProgressEmitTimestamp;
|
|
9
|
-
NSNumber* _lastProgressValue;
|
|
10
|
-
NSNumber* _contentLength;
|
|
11
|
-
NSNumber* _bytesWritten;
|
|
12
|
-
NSData* _resumeData;
|
|
13
|
-
NSString* _toFile;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
ProgressCallback globalProgressCallback;
|
|
17
|
-
DownloadCompleteCallback globalDownloadCompleteCallback;
|
|
18
|
-
ErrorCallback globalErrorCallback;
|
|
19
|
-
|
|
20
|
-
NSFileHandle* _fileHandle;
|
|
21
|
-
|
|
22
|
-
- (NSString *)generateCacheFilePath:(NSString *)extension{
|
|
23
|
-
NSUUID *uuid = [NSUUID UUID];
|
|
24
|
-
NSString *imageNameWihtoutExtension = [uuid UUIDString];
|
|
25
|
-
NSString *imageName=[imageNameWihtoutExtension stringByAppendingPathExtension:extension];
|
|
26
|
-
NSString *filePath =
|
|
27
|
-
[NSTemporaryDirectory() stringByAppendingPathComponent:imageName];
|
|
28
|
-
return filePath;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
- (NSString *)downloadFile:(NSString *)fromUrl downloadCompleteCallback:(DownloadCompleteCallback)downloadCompleteCallback progressCallback:(ProgressCallback)progressCallback errorCallback:(ErrorCallback)errorCallback
|
|
32
|
-
{
|
|
33
|
-
NSString *uuid = nil;
|
|
34
|
-
|
|
35
|
-
Downloader *downloader = [[Downloader alloc] init];
|
|
36
|
-
globalProgressCallback = progressCallback;
|
|
37
|
-
globalDownloadCompleteCallback = downloadCompleteCallback;
|
|
38
|
-
globalErrorCallback = errorCallback;
|
|
39
|
-
|
|
40
|
-
_lastProgressEmitTimestamp = 0;
|
|
41
|
-
_bytesWritten = 0;
|
|
42
|
-
|
|
43
|
-
NSURL* url = [NSURL URLWithString:fromUrl];
|
|
44
|
-
NSString *fileExtension = [fromUrl pathExtension];
|
|
45
|
-
|
|
46
|
-
NSString *toFile =[self generateCacheFilePath:fileExtension];
|
|
47
|
-
_toFile=toFile;
|
|
48
|
-
|
|
49
|
-
if ([[NSFileManager defaultManager] fileExistsAtPath:toFile]) {
|
|
50
|
-
_fileHandle = [NSFileHandle fileHandleForWritingAtPath:toFile];
|
|
51
|
-
|
|
52
|
-
if (!_fileHandle) {
|
|
53
|
-
NSError* error = [NSError errorWithDomain:@"Downloader" code:NSURLErrorFileDoesNotExist
|
|
54
|
-
userInfo:@{NSLocalizedDescriptionKey: [NSString stringWithFormat: @"Failed to write target file at path: %@", toFile]}];
|
|
55
|
-
|
|
56
|
-
globalErrorCallback(error);
|
|
57
|
-
return nil;
|
|
58
|
-
} else {
|
|
59
|
-
[_fileHandle closeFile];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
NSURLSessionConfiguration *config;
|
|
64
|
-
|
|
65
|
-
config = [NSURLSessionConfiguration defaultSessionConfiguration];
|
|
66
|
-
|
|
67
|
-
_session = [NSURLSession sessionWithConfiguration:config delegate:downloader delegateQueue:nil];
|
|
68
|
-
_task = [_session downloadTaskWithURL:url];
|
|
69
|
-
[_task resume];
|
|
70
|
-
|
|
71
|
-
return uuid;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didWriteData:(int64_t)bytesWritten totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
|
|
75
|
-
{
|
|
76
|
-
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)downloadTask.response;
|
|
77
|
-
|
|
78
|
-
_statusCode = [NSNumber numberWithLong:httpResponse.statusCode];
|
|
79
|
-
_contentLength = [NSNumber numberWithLong:httpResponse.expectedContentLength];
|
|
80
|
-
|
|
81
|
-
if ([_statusCode isEqualToNumber:[NSNumber numberWithInt:200]]) {
|
|
82
|
-
|
|
83
|
-
_bytesWritten = @(totalBytesWritten);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
double doubleBytesWritten = (double)[_bytesWritten longValue];
|
|
87
|
-
double doubleContentLength = (double)[_contentLength longValue];
|
|
88
|
-
double doublePercents = doubleBytesWritten / doubleContentLength * 100;
|
|
89
|
-
NSNumber* progress = [NSNumber numberWithUnsignedInt: floor(doublePercents)];
|
|
90
|
-
if ([progress unsignedIntValue] % 10 == 0) {
|
|
91
|
-
if (([progress unsignedIntValue] != [_lastProgressValue unsignedIntValue]) || ([_bytesWritten unsignedIntegerValue] == [_contentLength longValue])) {
|
|
92
|
-
_lastProgressValue = [NSNumber numberWithUnsignedInt:[progress unsignedIntValue]];
|
|
93
|
-
NSNumber *progressPercentage = @([_bytesWritten doubleValue] / [_contentLength doubleValue]);
|
|
94
|
-
return globalProgressCallback(progressPercentage);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didFinishDownloadingToURL:(NSURL *)location
|
|
103
|
-
{
|
|
104
|
-
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)downloadTask.response;
|
|
105
|
-
if (!_statusCode) {
|
|
106
|
-
_statusCode = [NSNumber numberWithLong:httpResponse.statusCode];
|
|
107
|
-
}
|
|
108
|
-
NSURL *destURL = [NSURL fileURLWithPath:_toFile];
|
|
109
|
-
NSFileManager *fm = [NSFileManager defaultManager];
|
|
110
|
-
NSError *error = nil;
|
|
111
|
-
if([_statusCode integerValue] >= 200 && [_statusCode integerValue] < 300) {
|
|
112
|
-
[fm removeItemAtURL:destURL error:nil]; // Remove file at destination path, if it exists
|
|
113
|
-
[fm moveItemAtURL:location toURL:destURL error:&error];
|
|
114
|
-
// There are no guarantees about how often URLSession:downloadTask:didWriteData: will fire,
|
|
115
|
-
// so we read an authoritative number of bytes written here.
|
|
116
|
-
_bytesWritten = @([fm attributesOfItemAtPath:_toFile error:nil].fileSize);
|
|
117
|
-
}
|
|
118
|
-
if (error) {
|
|
119
|
-
NSLog(@"RNFS download: unable to move tempfile to destination. %@, %@", error, error.userInfo);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// When numerous downloads are called the sessions are not always invalidated and cleared by iOS14.
|
|
123
|
-
// This leads to error 28 – no space left on device so we manually flush and invalidate to free up space
|
|
124
|
-
if(session != nil){
|
|
125
|
-
[session flushWithCompletionHandler:^{
|
|
126
|
-
[session finishTasksAndInvalidate];
|
|
127
|
-
}];
|
|
128
|
-
}
|
|
129
|
-
NSURL *fileURL = [NSURL fileURLWithPath:_toFile];
|
|
130
|
-
return globalDownloadCompleteCallback([fileURL absoluteString]);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error
|
|
134
|
-
{
|
|
135
|
-
if (error) {
|
|
136
|
-
NSLog(@"RNFS download: didCompleteWithError %@, %@", error, error.userInfo);
|
|
137
|
-
if (error.code != NSURLErrorCancelled) {
|
|
138
|
-
_resumeData = error.userInfo[NSURLSessionDownloadTaskResumeData];
|
|
139
|
-
if (_resumeData != nil) {
|
|
140
|
-
|
|
141
|
-
} else {
|
|
142
|
-
globalErrorCallback(error);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
@end
|
package/ios/Utils/MediaCache.h
DELETED
package/ios/Utils/MediaCache.m
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
#import "MediaCache.h"
|
|
2
|
-
|
|
3
|
-
@implementation MediaCache
|
|
4
|
-
NSMutableArray<NSString *> *completedImagePaths;
|
|
5
|
-
|
|
6
|
-
+ (void)addCompletedImagePath:(NSString *)imagePath {
|
|
7
|
-
if (imagePath) {
|
|
8
|
-
[completedImagePaths addObject:imagePath];
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
+ (void)removeCompletedImagePath:(NSString *)imagePath {
|
|
13
|
-
if (imagePath) {
|
|
14
|
-
[completedImagePaths removeObject:imagePath];
|
|
15
|
-
NSURL *fileURL = [NSURL URLWithString:imagePath];
|
|
16
|
-
NSString *fileSystemPath = [fileURL path];
|
|
17
|
-
|
|
18
|
-
NSFileManager *fileManager = [NSFileManager defaultManager];
|
|
19
|
-
NSError *error = nil;
|
|
20
|
-
|
|
21
|
-
if ([fileManager fileExistsAtPath:fileSystemPath isDirectory:nil]) {
|
|
22
|
-
[fileManager removeItemAtPath:fileSystemPath error:&error];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (error) {
|
|
26
|
-
NSLog(@"Error deleting image at path: %@", fileSystemPath);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
+ (void)cleanupCache {
|
|
32
|
-
NSFileManager *fileManager = [NSFileManager defaultManager];
|
|
33
|
-
NSString *cacheDirectory = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
|
|
34
|
-
|
|
35
|
-
for (NSString *imagePath in completedImagePaths) {
|
|
36
|
-
NSString *absoluteImagePath = [cacheDirectory stringByAppendingPathComponent:imagePath];
|
|
37
|
-
NSError *error = nil;
|
|
38
|
-
|
|
39
|
-
if ([fileManager fileExistsAtPath:absoluteImagePath]) {
|
|
40
|
-
[fileManager removeItemAtPath:absoluteImagePath error:&error];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (error) {
|
|
44
|
-
NSLog(@"Error deleting image at path: %@", absoluteImagePath);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
[completedImagePaths removeAllObjects];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _default = _reactNative.TurboModuleRegistry.getEnforcing('VideoCompressor');
|
|
9
|
-
exports.default = _default;
|
|
10
|
-
//# sourceMappingURL=NativeVideoCompressor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_default","TurboModuleRegistry","getEnforcing","exports","default"],"sourceRoot":"../../../src","sources":["Spec/NativeVideoCompressor.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAYpCC,gCAAmB,CAACC,YAAY,CAAO,iBAAiB,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAJ,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["Spec/NativeVideoCompressor.ts"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,cAAc;AAYlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,iBAAiB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { TurboModule } from 'react-native';
|
|
2
|
-
export interface Spec extends TurboModule {
|
|
3
|
-
compress(fileUrl: string, optionMap: Object): Promise<string>;
|
|
4
|
-
cancelCompression(uuid: string): void;
|
|
5
|
-
upload(fileUrl: string, options: Object): Promise<string>;
|
|
6
|
-
activateBackgroundTask(options: Object): Promise<string>;
|
|
7
|
-
deactivateBackgroundTask(options: Object): Promise<string>;
|
|
8
|
-
addListener(eventName: string): void;
|
|
9
|
-
removeListeners(count: number): void;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: Spec;
|
|
12
|
-
export default _default;
|
|
13
|
-
//# sourceMappingURL=NativeVideoCompressor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NativeVideoCompressor.d.ts","sourceRoot":"","sources":["../../../src/Spec/NativeVideoCompressor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9D,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACzD,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;;AAED,wBAAyE"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { TurboModule } from 'react-native';
|
|
2
|
-
import { TurboModuleRegistry } from 'react-native';
|
|
3
|
-
|
|
4
|
-
export interface Spec extends TurboModule {
|
|
5
|
-
compress(fileUrl: string, optionMap: Object): Promise<string>;
|
|
6
|
-
cancelCompression(uuid: string): void;
|
|
7
|
-
upload(fileUrl: string, options: Object): Promise<string>;
|
|
8
|
-
activateBackgroundTask(options: Object): Promise<string>;
|
|
9
|
-
deactivateBackgroundTask(options: Object): Promise<string>;
|
|
10
|
-
addListener(eventName: string): void;
|
|
11
|
-
removeListeners(count: number): void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default TurboModuleRegistry.getEnforcing<Spec>('VideoCompressor');
|