Permalink
Browse files

should work in chrome 12 now

  • Loading branch information...
1 parent da82ad9 commit 195431a704979f6f0ddfb84336174ded01e764bc @antimatter15 committed Apr 29, 2011
Showing with 10 additions and 2 deletions.
  1. +9 −1 id3v2.js
  2. +1 −1 player.appcache
View
@@ -609,11 +609,19 @@ parseFile: function(file, onComplete){
}
setTimeout(arguments.callee, 0);
})()
- reader.readAsBinaryString(file.slice(0, 128 * 1024));
+ reader.readAsBinaryString(fileSlice(file, 0, 128 * 1024));
return [reader, ID3v2.parseStream(read, onComplete)];
}
}
+
+function fileSlice(file, start, length){
+ if(file.mozSlice) return file.mozSlice(start, start + length);
+ if(file.webkitSlice) return file.webkitSlice(start, start + length);
+ if(file.slice) return file.slice(start, length);
+}
+
+
//doesnt quite belong here but doesnt quite belong elsewhere either
function guessSong(n){
var parts = unescape(n)
View
@@ -1,5 +1,5 @@
CACHE MANIFEST
-#rev 4
+#rev 5
player.html
id3v2.js
16.png

0 comments on commit 195431a

Please sign in to comment.