Git Product home page Git Product logo

Comments (5)

michaelherger avatar michaelherger commented on May 27, 2024

Related to issue #25

from librespot.

sashahilton00 avatar sashahilton00 commented on May 27, 2024

Probably best implemented in #20

from librespot.

plietar avatar plietar commented on May 27, 2024

It seems like the onstart/onstop/onchange hooks are more or less sufficient for your usecase, unless I am missing something?

What needs to be done is in player.rs switch them into arbitrary closures and move the "execute external program" part to main.rs. This way you'll be able to use your custom code by only patching/writing your own main.rs

from librespot.

michaelherger avatar michaelherger commented on May 27, 2024

That's a starting point. But the player state handling is somewhat irritating: if a track plays out (ends) and a new one begins, I'd get a stop event. I was having a hard time trying to figure out from the callee whether the playback really ended or not. But that's probably my convoluted way of using librespot :-).

FWIW: as I'm not using librespot's playback but am piping the PCM stream through LMS, I did add volume change events, too. But that's really a non-standard use case.

from librespot.

sashahilton00 avatar sashahilton00 commented on May 27, 2024

Continued discussion in #189 and being handled in #190. Closing in favour of those.

from librespot.

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.