-
-
Notifications
You must be signed in to change notification settings - Fork 108
/
Copy pathCompressorSpec.kt
36 lines (31 loc) · 1.7 KB
/
CompressorSpec.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.reactnativecompressor
import com.facebook.react.bridge.Promise
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReactContextBaseJavaModule
import com.facebook.react.bridge.ReadableMap
abstract class CompressorSpec(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
abstract fun image_compress(
imagePath: String,
optionMap: ReadableMap,
promise: Promise)
abstract fun compress_audio(
fileUrl: String,
optionMap: ReadableMap,
promise: Promise)
abstract fun generateFilePath(_extension: String, promise: Promise)
abstract fun getRealPath(path: String, type: String, promise: Promise)
abstract fun getVideoMetaData(filePath: String, promise: Promise)
abstract fun getImageMetaData(String filePath, Promise promise);
abstract fun getFileSize(filePath: String, promise: Promise)
abstract fun compress(fileUrl: String, optionMap: ReadableMap, promise: Promise)
abstract fun cancelCompression(uuid: String)
abstract fun upload(fileUrl: String, options: ReadableMap, promise: Promise)
abstract fun cancelUpload(uuid: String, shouldCancelAll:Boolean)
abstract fun download(fileUrl: String, options: ReadableMap, promise: Promise)
abstract fun activateBackgroundTask(options: ReadableMap, promise: Promise)
abstract fun deactivateBackgroundTask(options: ReadableMap, promise: Promise)
abstract fun createVideoThumbnail(fileUrl: String, options: ReadableMap, promise: Promise)
abstract fun clearCache(cacheDir: String?, promise: Promise)
abstract fun addListener(eventName: String)
abstract fun removeListeners(count: Double)
}