Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upBug: when a MP4 file is appendTo() the DOM, callback of getBlob() isn't invoked after the file is downloaded #1543
Comments
This comment has been minimized.
This comment has been minimized.
|
I found a solution that works. You will need to getBlob() and getBlobURL() inside torrent.on('done'). Before that, I simply looped through all the files and ran getBlob() and getBlobURL() once the torrent ID was added, hoping the callback would be called when files were finished downloading. Turns out, you will need to run the methods inside torrent.on('done'). I don't know if it's a bug or not, but as long as it's working now :) |
This comment has been minimized.
This comment has been minimized.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This comment has been minimized.
This comment has been minimized.
|
This sounds like a bug. Re-opening until we can confirm/disconfirm this as a bug. |
The issue is similar to what I made #1542 a few days ago. But now the problem is related to getBlob() instead of getBlobURL()
When the
if (file.name.endsWith('.mp4') && !hasVideoPlayed) {}block is present and files in MP4 format, callback in file.getBlob() isn't invoked.If I remove the code block, everything works as expected. Therefore, for some reason, getBlob() and getBlobURL() don't work well together with appendTo().