Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoCompressEventEmitter.removeSubscription is not a function while compress a video file #39

Closed
rahulll187 opened this issue Oct 27, 2021 · 6 comments

Comments

@rahulll187
Copy link

Hello,

Im getting this error while compress video in auto compression mode.
here is my code, where

url = 'file:///data/user/0/com.qlandemo/cache/c850b3e6-6e20-49d2-a844-6102dd7243e8.mp4'

note - it's going in catch part every time & give me the error - VideoCompressEventEmitter.removeSubscription is not a function

can anyone help me to resolve it?

Thanks in advance.

Video.compress(
      url,
      {
        compressionMethod: 'auto',
      },
      progress => {
        if (backgroundMode) {
          console.log('ok');
        } else {
          console.log('progress', progress);
        }
      },
    )
      .then(res => console.log('res', res))
      .catch(error => console.log('err', error));
@numandev1
Copy link
Owner

numandev1 commented Oct 27, 2021

@rahulll187 can you share catch error here?

@rahulll187
Copy link
Author

sure @nomi9995, here it is.

Screenshot 2021-10-28 at 6 37 04 PM

@numandev1
Copy link
Owner

@rahulll187 can you tell me your react-native version?

@rahulll187
Copy link
Author

@nomi9995 , my react-native version is 0.66.1

@numandev1
Copy link
Owner

@rahulll187 I am also using the 0.66.1 version but I am not getting this issue. can you provide a reproducible example?

@numandev1
Copy link
Owner

@rahulll187 I just release 1.0.0 can you try the 1.0.0 version

yarn add react-native-compressor@1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants