User Agent: Mozilla/5.0 (Windows NT 6.0; rv:25.0) Gecko/20100101 Firefox/25.0 (Beta/Release) Build ID: 20131112160018 Steps to reproduce: Related to 944918 and 945281 Except that following http://lists.w3.org/Archives/Public/public-webapps/2013OctDec/0743.html the method has been changed: chunks are stored in IDB as Blobs and concatenated at the end. I don't know how to produce a reduced test case but this happens for example doing: load file, store in IDB (initial blob) --> encrypt file, store in IDB --> decrypt file, store in IDB (decrypted blob) Let's say the file is a mp4 file, doing a.href=document.createObjectURL(decrypted blob) will not display the video, or partially and stop. a.href=document.createObjectURL(initial blob) works. I checked that initial blob and decrypted blob are the "same" files (same hash) Now, refreshing the page and retrying the decrypted blob retrieved from indexedDB will work again. This new decrypted blob is exactly the decrypted blob above that was stored in indexedDB after concatenation and for which createObjectURL did not render correctly. So the conclusion seems to be that the concatenated blob is correctly stored in IDB but for some reasons does not render correctly with createObjectURL. Same tests have been performed with Chrome without any problem. The issue is still there with Nightly.
Note: Chrome does not support storing Blobs in indexedDB for now, so ArrayBuffers are stored instead and concatenated as a Blob.
Please attach a testcase or post a link to one.
Are you trying to reuse the same result from createObjectURL? The URL is automatically revoked when the page is unloaded (in this case, when you refresh) so the old createObjectURL is no longer valid. You need to call createObjectURL again with the blob that you just retrieved from indexedDB.
I will post a link when available or a test case. Not sure my description was clear: - slice blob, decrypt chunks, concatenate decrypted chunks = decrypted_blob, store decrypted_blob in IDB (decrypted_blob2) - createObjectURL(decrypted_blob) --> NOK, incorrect rendering - save decrypted_blob on the disk, open with video player --> OK - retrieve decrypted_blob2, createObjectURL(decrypted_blob2) --> OK Conclusion: only decrypted_blob after chunk concatenation behaves incorrectly
Yeah, a link or testcase would be great.
That's not a test case, neither a link for now, but you can look at the demo video here: http://www.peersm.com and jump to 12mn 3/4s --> We tried to hide it but if you observe correctly, after opening the video you can see that the video freezes (which does not happen with Chrome as we can see in the video too)
Still not a reduced test case but you can now see the issue: http://peersm.com/peersm Key: 00112233445566778899aabbccddeeff Download: d5e505e844464056f31cd30e861139dcdc5d2b39 Rename as: collusion.mp4 Open/save: the video starts and gets frozen Save as collusion.mp4 on your disk Open from your disk: the video works Conclusion: createObjectURL incorrect rendering
I forgot: if you refresh the page and open the video again, this will work.
Trying to follow the steps from comment 7. I load the page. It prompts for the key. I put in the key. It does some "loading" thing. Then I put the "d5e505e844464056f31cd30e861139dcdc5d2b39" string into the "Enter url or hash name" textbox and click the "Download" button, right? It pops up some dialog that immediately disappears, then nothing happens...
Yes, sorry, I gave the wrong reference (the dialog says that the file can not be retrieved), please put: bfee6892dd7a1cc5c167aa00f4d0544fc8549e22, you can let me know by email if there are further problems.
I suppose it did not work, please try it again, it's more stable now. Question: can we stream a media right now with createObjectURL? (ie createObjectURL(Blob) augmenting the blob)
Hi Aymeric, I have tested this issue with the provided steps from comment 7 on latest Firefox (44.0.2) release, latest Nightly (47.0a1) build and I could not reproduce it. The video played without freezing. I was able to watch the entire video without any problems. Firefox: 47.0a1, Build ID: 20160216030245 User Agent Mozilla/5.0 (Windows NT 6.0; rv:47.0) Gecko/20100101 Firefox/47.0 Firefox: 44.0.2, Build ID: 20160210153822 User Agent Mozilla/5.0 (Windows NT 6.0; rv:47.0) Gecko/20100101 Firefox/44.0 Can you please test this on the latest Firefox release (44.0.2) or latest Nightly (47.0a1, https://nightly.mozilla.org/) and tell me if this still reproduces for you ? When doing this please use a new fresh Firefox profile, maybe also in safe mode (https://support.mozilla.org/en-US/kb/troubleshoot-and-diagnose-firefox-problems). Thanks, Cosmin.
Hi, Considering the fact that I cannot reproduce this and the fact that the reporter did not answered to my request until now, I will mark this as Resolved-Worksforme. If anyone can still reproduce it, feel free to reopen the issue and provide more information. Thanks, Cosmin.