Giter Site home page Giter Site logo

Comments (11)

RSATom avatar RSATom commented on July 28, 2024

hm... strange, it should (I've checked the sources). Ok, will look close a little later. Thanks!

from webchimera.

jaruba avatar jaruba commented on July 28, 2024

then maybe it's something with .state? could it be it doesn't change to 2 (buffering)? or maybe .state is changed to 2 after the buffering event is triggered?

from webchimera.

RSATom avatar RSATom commented on July 28, 2024

I think .state could skip some state if change was happen very quickly, since state event not tied strong with .state value. And there could be some delay in .state update. Events in this case are more reliable.

from webchimera.

RSATom avatar RSATom commented on July 28, 2024

The reason is I emit MediaPlayerStateChanged not when .state value was changed (I have no control over it), but when some related event arrive: https://github.com/RSATom/QmlVlc/blob/master/QmlVlcPlayerProxy.cpp#L50

So if you get MediaPlayerBufferingevent, after that you will get MediaPlayerStateChanged since one triggers another.

from webchimera.

jaruba avatar jaruba commented on July 28, 2024

Does MediaPlayerStateChanged also pass the new state to the callback function?

from webchimera.

RSATom avatar RSATom commented on July 28, 2024

Don't sure I understand what you mean.

from webchimera.

jaruba avatar jaruba commented on July 28, 2024

If something like MediaPlayerStateChanged( state ) is possible. so it would pass the new state when the event is triggered.

from webchimera.

RSATom avatar RSATom commented on July 28, 2024

no, since I have only async access to state. I.e. it will have the same problem.

from webchimera.

RSATom avatar RSATom commented on July 28, 2024

but stop, you are right, I can deduce current state from original event. Good Idea.

from webchimera.

jaruba avatar jaruba commented on July 28, 2024

There is one more problem with MediaPlayerStateChanged that I've found. I guess it should trigger only when the state has changed (ie: is different from the previous state), but I added a console.log() to the event and it's triggering a lot more times for the same exact states in a row.

from webchimera.

RSATom avatar RSATom commented on July 28, 2024

Yes, I didn't store previous state value

from webchimera.

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.