capacitor-native-video-compressor 1.1.0 → 1.1.2
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 +80 -6
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/com/atomic/videocompressor/NativeVideoCompressorPlugin.java +95 -10
- package/android/src/main/java/com/atomic/videocompressor/VideoCompressionService.java +278 -22
- package/dist/docs.json +46 -0
- package/dist/esm/definitions.d.ts +30 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +5 -0
- package/dist/esm/web.js +7 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +7 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +7 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/NativeVideoCompressorPlugin/NativeVideoCompressorPlugin.swift +9 -1
- package/package.json +1 -1
|
@@ -15,7 +15,8 @@ public class NativeVideoCompressorPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
15
15
|
public let pluginMethods:[CAPPluginMethod] = [
|
|
16
16
|
CAPPluginMethod(name: "compressVideo", returnType: CAPPluginReturnPromise),
|
|
17
17
|
CAPPluginMethod(name: "cancel", returnType: CAPPluginReturnPromise),
|
|
18
|
-
CAPPluginMethod(name: "initialize", returnType: CAPPluginReturnPromise)
|
|
18
|
+
CAPPluginMethod(name: "initialize", returnType: CAPPluginReturnPromise),
|
|
19
|
+
CAPPluginMethod(name: "finishUpload", returnType: CAPPluginReturnPromise)
|
|
19
20
|
]
|
|
20
21
|
|
|
21
22
|
/// The job `compressVideo` is running right now, for `cancel(jobId:)`.
|
|
@@ -41,6 +42,13 @@ public class NativeVideoCompressorPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
41
42
|
* down the `else` branch — `markAsFinished()`, `group.leave()` — and the
|
|
42
43
|
* existing completion handler runs. No new exit path, no polling.
|
|
43
44
|
*/
|
|
45
|
+
/// Chỉ Android mới có foreground service để hạ xuống. Khai ở đây để caller
|
|
46
|
+
/// gọi thẳng mà không phải rẽ nhánh theo platform ở mọi call site - thiếu
|
|
47
|
+
/// nó thì mỗi lần gọi trên iOS là một promise bị reject "not implemented".
|
|
48
|
+
@objc func finishUpload(_ call: CAPPluginCall) {
|
|
49
|
+
call.resolve()
|
|
50
|
+
}
|
|
51
|
+
|
|
44
52
|
@objc func cancel(_ call: CAPPluginCall) {
|
|
45
53
|
stateLock.lock()
|
|
46
54
|
let running = currentJobId
|
package/package.json
CHANGED