| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Need add ID3v2.readSynchsafeInteger32At = readSynchsafeInteger32At; in ID3v2
|
update, https://github.com/Feverqwe/JavaScript-ID3-Reader/commit/abb3fedb50feeed3574ae0fbd1e0620c2ce6a3b1 |
Sorry, something went wrong.
|
The FileReader should just be there to provide data and shouldn't deal with tags reading logic. I think the best option is to create something similar to BufferedBinaryFile (this one only works for XHR). But the idea is the same, extend BinaryFile and implement loadRanges() in a way that only reads the needed data from the file. https://github.com/aadsm/JavaScript-ID3-Reader/blob/master/src/bufferedbinaryajax.js#L231-L240 The current architecture is not ideal but it served its purpose at the time, I haven't had the time to rewrite it, so it is what it is :-) |
Sorry, something went wrong.
|
I'am add BufferedBinaryFileReader! Note, have big problem with getBlockAtOffset, I don't know how fix it, need callback. https://github.com/Feverqwe/JavaScript-ID3-Reader/commit/768928004cfa0cfe059b2f01fe91426f93e9e86a |
Sorry, something went wrong.
|
It's definitely a step in the right direction but I was not thinking about creating a new file option. |
Sorry, something went wrong.
|
I've used your code to create a BufferedFileAPIReader, I created a branch with it, can you try it out? https://github.com/aadsm/JavaScript-ID3-Reader/tree/pr-26 What do you mean with having a big problem with getBlockAtOffset? There's still a lot of duplicated code, the problem of not using prototype inheritance... |
Sorry, something went wrong.
|
When I tested this code, part of the images were broken, it's probably due to the fact that not all the relevant part of the file is loaded. I will try to implement this option, but it requires some time. |
Sorry, something went wrong.
|
I didn't have any problems in my tests, I was able to read images just fine. |
Sorry, something went wrong.
|
You won't have problems because blockSize in most cases covers the required part. Need to change some of the range for loadRange then blockSize is not required. If you would be interested, I slightly changed the way of getting the picture, this works much better than the one that was before, but changes the type of the output ( from getBytesAt to getStringAt ). And I write script for windows |
Sorry, something went wrong.
|
I'am update bufferedbinaryfilereader, remove blockSize, add Uint8Array, and now it very small and fast reader =) https://github.com/Feverqwe/JavaScript-ID3-Reader/commit/d76672bd57e50ac612242664e6f74a0320d61617 ID3v2 ID3v1 and should work well, as they have the specified size. ID4 like also works not bad. I made a small change in ID3v2. upd. now work ID4, many fix's with ranges. https://github.com/Feverqwe/JavaScript-ID3-Reader/commit/941ebc1d0de9781ba123dc0ce5fb2cd2b8515a80 see last version file (I can change something.). |
Sorry, something went wrong.
|
Great work Anton, thank you so much! This is what I was going to do this morning but even more :-) I've added comments to your two commits, I don't think I understand the motivation behind the changes in ID4. |
Sorry, something went wrong.
|
Just.. uncomment console.log in bufferedbinaryfilereader.js, and it show all unloaded blocks, it don't all fix's, but it work. I sometimes difficult to understand code and specifications, but it seems now it works not bad. |
Sorry, something went wrong.
|
Thanks for all your comments and fixes (it seems that I can't do basic math :D) Greetings from California to Ufa (which is one of the Russian cities marked in my world map shower curtain!) |
Sorry, something went wrong.
|
yes bufferedfilereader.js sounds better =) Thanks for a great library. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Need add ID3v2.readSynchsafeInteger32At = readSynchsafeInteger32At;
in ID3v2