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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-native-video-compressor",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Native video compressor using LightCompressor and AVFoundation",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",