I finally released something based on the jstorrent code.
You can download the packaged app from google play. If you’re not aware, packaged apps are like browser extensions, only they get their own top level window. As of the date of this writing, they are not searchable within the google app store that you find in your chrome browser, but should be at some point. There is an ongoing discussion thread on google groups for commonly encountered issues.
It’s pretty neat, having access to raw sockets. The goal of jstorrent is to work with any type of connection, be it websockets, webrtc, or raw sockets. I like the abstraction of an “IOStream” that I picked up while working with tornado.
Neat. The chrome.socket implementation seems to be pretty undocumented at this point so I had to make a few guesses with the edge cases but this class lets me use it in about the same way I would use a websocket stream.
Currently I’m working on adding functionality to download to a cloud storage provider (Google drive first, Dropbox and others later) so that browsers without filesystems can still consume torrents. It’s kind of a pain, because pieces can span multiple files and I want to make sure I don’t have any memory leaks. Working with streams is rather tricky. And handling error states with resumable uploads will add even more complexity.
After that, implementing a WebRTC stream class will be a game-changer! Well, maybe. At least it’ll be a good example use case for WebRTC. Really though, I think the best use cases for WebRTC are real time games. It would be neat for example to see Warcraft II ported to the browser and maybe have the connection to your friend be initiated like it was back in the good old days, by dialing a phone number. The browser based version should make the modem baudrate handshaking song, too, for added effect.