Code Monkey home page Code Monkey logo

Comments (10)

zohararad avatar zohararad commented on September 28, 2024

I agree that this is an edge-case that can be easily solved by using one instead of on. Do you have any suggestions for an elegant solution to this?

from audio5js.

tf avatar tf commented on September 28, 2024

Well, in the simplest case the iteration could simply be rewritten to a for-loop, right?

from audio5js.

zohararad avatar zohararad commented on September 28, 2024

Correct, but then removing the events marked as once becomes a bit of a hassle. I'm happy to accept a PR if you want to send one

from audio5js.

belldandu avatar belldandu commented on September 28, 2024

@zohararad @tf from my experience with javascript i'm pretty sure that if you do one or once it will return the same value it returned the first time every time it see's the event 'progress'. If this is what you are aiming for then i'm all for it. But Otherwise if no response from the owner of this issue is made within 24-48 hours can this be closed?

from audio5js.

zohararad avatar zohararad commented on September 28, 2024

@KamijouTouma this is an edge-case to begin with. Agreed - we'll close of no response from owner in 24h

from audio5js.

tf avatar tf commented on September 28, 2024

I still think this is not the desired behavior. I don't have time to provide a fix myself right now though. So if you think this does not have to be addressed, feel free to close.

from audio5js.

zohararad avatar zohararad commented on September 28, 2024

@tf I agree it's not the desired behaviour, but given that I too have little time to maintain the library, and we're talking about an edge case, I'm going to leave it open for now and treat it as low priority.

I'll try and allocate some time to investigate a solution. @KamijouTouma please feel free to pitch in if you have the time.

from audio5js.

belldandu avatar belldandu commented on September 28, 2024

@zohararad Sure ill be happy to.

from audio5js.

kosso avatar kosso commented on September 28, 2024

I had issues unsubscribing using off()

The only way I got around it was to flush the play channels arrays for each event.

eg: yourAudio5Player.channels.play = []; seems to remove the event listener for play.

from audio5js.

zohararad avatar zohararad commented on September 28, 2024

Can you share a code sample of this? It might be a persistent bug in the code I need to address.

from audio5js.

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.