Add support read hook and implement webAPI based read hook#82
Add support read hook and implement webAPI based read hook#82hellais wants to merge 7 commits intoflowjs:masterfrom
Conversation
|
I can't run the unittests locally so I am hoping this will kick off the travis unittest. |
|
test |
|
I believe the above error is now fixed. What is the status on getting this merged into upstream? |
|
@AidasK can you provide us a feedback for the possibility to merge it and for a tentative release schedule? |
There was a problem hiding this comment.
yes it has the default you suggested:
read: webAPIFileRead,
that is:
/**
* Default read function using the webAPI
*
* @function webAPIFileRead(chunk, startByte, endByte, fileType)
*
*/
function webAPIFileRead(chunk, startByte, endByte, fileType) {
var function_name = (chunk.fileObj.file.slice ? 'slice' :
(chunk.fileObj.file.mozSlice ? 'mozSlice' :
(chunk.fileObj.file.webkitSlice ? 'webkitSlice' :
'slice')));
chunk.readFinished(chunk.fileObj.file[function_name](startByte, endByte, fileType));
}
There was a problem hiding this comment.
an other time this is a code pattern (https://github.com/shichuan/javascript-patterns/blob/master/general-patterns/single-var-pattern.html) but given that you do not use it in other parts of the code i will change it.
There was a problem hiding this comment.
Sorry, haven't noticed comma in line above. I just try to follow google style guide and to be consistent.
|
Could you also update documentation? It would be great to have an example, how you are using this for compression and encryption. Thanks! |
There was a problem hiding this comment.
comma might cause a fata error for IE browsers
|
this has been integrated a lot of time ago by means of a different pull request. |
Based on discussion and feedback from @AidasK in #42