Comments (10)
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.
Well, in the simplest case the iteration could simply be rewritten to a for
-loop, right?
from audio5js.
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.
@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.
@KamijouTouma this is an edge-case to begin with. Agreed - we'll close of no response from owner in 24h
from audio5js.
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.
@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.
@zohararad Sure ill be happy to.
from audio5js.
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.
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)
- Setting volume on ready event causes TypeError HOT 6
- Error when on https HOT 4
- one instance has issues loading multiple tracks HOT 4
- Playback speed support HOT 3
- Instance attribute 'position' is a formatted string. HOT 1
- milli seconds for progress HOT 4
- npm does not install latest release HOT 6
- Button to control sound in webpage HOT 3
- Angular implementation
- Catch HTTP response errors when loading audio? HOT 2
- Replay issue in IE8 HOT 1
- trigger 'canplaythrough' and 'stalled' HOT 1
- No Audio Android Chrome, But Full Audio Android Firefox?? HOT 13
- Uncaught (in promise) DOMException: play() can only be initiated by a user gesture. HOT 4
- fail to get audio duration directly HOT 6
- failed to pause playing immediately after this.play() HOT 3
- can laod Multiple songs at one time HOT 1
- any method to clear the event queue of specific event? HOT 4
- Uncaught (in promise) DOMException: play() failed because ... HOT 11
- Can't get info when loaded or play
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audio5js.