cancel only session with sessionId

pull/339/head
Andrew Shini 3 years ago committed by GitHub
parent 3d7d7cf41e
commit c63401acf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      react-native/src/index.js

@ -671,11 +671,9 @@ export class AbstractSession extends Session {
/**
* Cancels running the session.
*/
cancel() {
async cancel() {
const sessionId = this.getSessionId();
if (sessionId === undefined) {
return FFmpegKitReactNativeModule.cancel();
} else {
if (sessionId !== undefined) {
return FFmpegKitReactNativeModule.cancelSession(sessionId);
}
}

Loading…
Cancel
Save