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. * Cancels running the session.
*/ */
cancel() { async cancel() {
const sessionId = this.getSessionId(); const sessionId = this.getSessionId();
if (sessionId === undefined) { if (sessionId !== undefined) {
return FFmpegKitReactNativeModule.cancel();
} else {
return FFmpegKitReactNativeModule.cancelSession(sessionId); return FFmpegKitReactNativeModule.cancelSession(sessionId);
} }
} }

Loading…
Cancel
Save