Code Monkey home page Code Monkey logo

Comments (9)

crtl avatar crtl commented on July 22, 2024 1

Ok, thanks to the following lines:

// video_compressor.dart

factory VideoCompress() {
    if (_instance == null) _instance = VideoCompress._();
    return _instance;
  }

  VideoCompress._() {
    _channel.setMethodCallHandler(_progresCallback);
  }

You have to call VideoCompress() constructor at least once for compressProgress$ to work.

from videocompress.

hungtran2492 avatar hungtran2492 commented on July 22, 2024

I have the same issue. Can you check this?

from videocompress.

jonataslaw avatar jonataslaw commented on July 22, 2024

Ok, thanks to the following lines:

// video_compressor.dart

factory VideoCompress() {
    if (_instance == null) _instance = VideoCompress._();
    return _instance;
  }

  VideoCompress._() {
    _channel.setMethodCallHandler(_progresCallback);
  }

You have to call VideoCompress() constructor at least once for compressProgress$ to work.

You're right

from videocompress.

BytesZero avatar BytesZero commented on July 22, 2024

@jonataslaw @shubham-chhimpa Mine is that iOS has no compression progress, Android has, v2.0.0

from videocompress.

ukuleleplayer avatar ukuleleplayer commented on July 22, 2024

Can confirm. As mentioned above, the fix is as simple as calling the constructor once.
Nice tool!

from videocompress.

VikashIOS avatar VikashIOS commented on July 22, 2024

@crtl @jonataslaw @ukuleleplayer did you find the solution. I need help in this please share the solutions.

from videocompress.

wildsurfer avatar wildsurfer commented on July 22, 2024

Same issue

from videocompress.

crtl avatar crtl commented on July 22, 2024

@VikashIOS Do you even read? Or just post IDK?

from videocompress.

shubham-chhimpa avatar shubham-chhimpa commented on July 22, 2024

Ok, thanks to the following lines:

// video_compressor.dart

factory VideoCompress() {
    if (_instance == null) _instance = VideoCompress._();
    return _instance;
  }

  VideoCompress._() {
    _channel.setMethodCallHandler(_progresCallback);
  }

You have to call VideoCompress() constructor at least once for compressProgress$ to work.

Yes this worked for me.
Thanks !

For those who want the solution

Just add this line to the initState() function

    VideoCompress videoCompress = new VideoCompress();

This code looks like.

 @override
  void initState() {
    VideoCompress videoCompress = new VideoCompress();
    super.initState();
    _subscription =
        VideoCompress.compressProgress$.subscribe((progress) {
          debugPrint('myprogress: ${progress}');
        });
  }

from videocompress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.