-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't re-commence playback after playback ends (using flac.js) #104
Comments
@wsot you need to use x.remove(); function after playback end. |
There is no x.remove() function, at least not in the latest provided release prebuilts. |
I'm experiencing the same issue. I've come up with a temporary fix in aurora.js after each |
@alexwhb I partially resolved the problem of needing to re-download the file each time by modifying the aurora js lib as follows:
This is actually intended to solve two problems, but the problems are basically the same.
Although this worked for me for a while, I believe problems have arisen with Chrome in some cases since I did it. Also, I only used the code on something I didn't really care about so be wary with that, too. |
Note for anyone else having the problem of not being able to re-play tracks: Example code:
|
@wsot your patch aurora.mod.js seems to be not complete. |
(Months later) Sorry, you're right:
I should point out that this doesn't necessarily work 100%. I haven't used aurora.js in a while so YMMV. |
I'm using aurora.js and flac.js to decode FLAC client-side (using Chromium Version 38.0.2125.122 (290379)).
I'm finding that once a Player has finished playing, then you can't re-use it for playback of the same file.
I've been trying to implement an ABX tool in Javascript so generally I want to perform many repetitions of the same samples.
Super-simplified code:
x = AV.Player.fromURL('http://myserver/tracks/mysample.flac');
x.preload();
x.play();
// plays happily until completion
x.seek(0); //try to return to start
x.play(); // does nothing
This problem is compounded by tracks not playing if they are retrieved from cache.
To test, open dev tools in Chrome, and ensure that on the 'network' tab the 'Disable cache' option is disabled.
Then do the commands:
x = AV.Player.fromURL('http://myserver/tracks/mysample.flac');
x.preload();
x.play();
// plays happily, then finishes. Let's use the same asset from cache
y = AV.Player.fromURL('http://myserver/tracks/mysample.flac');
y.preload();
y.play();
// 'network' tab in dev tools says the file was loaded from cache; trying to play simply doesn't work.
Thus, it seems that in order to create an ABX tool using aurora.js/flac.js, the user would have to download the each sample once per repetition of the track (e.g. 20 times per sample).
The text was updated successfully, but these errors were encountered: