|
|
@ -669,11 +669,13 @@ export class AbstractSession extends Session { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Cancels running the session. |
|
|
|
* Cancels running the session. Only starts cancellation. Does not guarantee that session is cancelled when promise resolves. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
async cancel() { |
|
|
|
async cancel() { |
|
|
|
const sessionId = this.getSessionId(); |
|
|
|
const sessionId = this.getSessionId(); |
|
|
|
if (sessionId !== undefined) { |
|
|
|
if (sessionId === undefined) { |
|
|
|
|
|
|
|
return Promise.reject(new Error('sessionId is not defined')); |
|
|
|
|
|
|
|
} else { |
|
|
|
return FFmpegKitReactNativeModule.cancelSession(sessionId); |
|
|
|
return FFmpegKitReactNativeModule.cancelSession(sessionId); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|