How to load large video files using javascript xhr (in chrome)

Due to a bug that keeps crashing chrome tabs ( http://code.google.com/p/chromium/issues/detail?id=138506 ), it is not possible to upload large files (> 50-80MB) via ajax request.

Unfortunately, I have to use Chrome as it is the only browser that currently implements the FileSystem API ( http://www.w3.org/TR/file-system-api/ ).

How do I load a large movie file to display it in <video>

?

Do you have any code samples?

+3


source to share


2 answers


I was able to handle a working javascript chunkloader implementation. It relies on some server-side code that returns the number of blocks and the chunks themselves. The client side code works well enough.



If you'd like to take a look or get any improvements, feel free to fork, copy or share: https://github.com/bux578/chunkload.js

+1


source


As per the problem you linked to, this is the retention limit that you can get in any memory-constrained browser.

The problem in Chrome is that XHR does not throw an exception, so the error cannot be detected and handled - so it looks like a fix is ​​missing, possibly increasing the available memory.



The API file is available with full support in Firefox, Chrome, Safari and Opera and partial support in IE10:

http://caniuse.com/fileapi

0


source







All Articles