Is the js-ipfs Javascript library the equivalent for IPFS of what WebTorrent is to Bittorrent?

From @mayerwin on Sun Sep 18 2016 12:56:28 GMT+0000 (UTC)

Is the browser-embeddable Javascript library js-ipfs the equivalent for IPFS of what WebTorrent is to Bittorrent? How does fallback work for browsers that do not support WebRTC?


Copied from original issue: https://github.com/ipfs/faq/issues/180

From @diasdavid on Mon Jan 16 2017 03:53:46 GMT+0000 (UTC)

Hi @mayerwin, apologies for taking so long to get back to you, I completely missed this one.

js-ipfs is a full node, not a light client. In its final state it will be able to talk with any node in the network. See a more complete answer here: https://github.com/ipfs/faq/issues/97

From @mayerwin on Mon Jan 16 2017 04:19:36 GMT+0000 (UTC)

@diasdavid Thanks, I didn’t find the answers to the second part of the question though: does js-ipfs make use of WebRTC? If so, is there any fallback to browsers that do not support it to ensure js-ipfs works on all major browsers (Firefox, Chrome, Edge, Safari)?

From @diasdavid on Mon Jan 16 2017 04:24:47 GMT+0000 (UTC)

@mayerwin right! On that part, the simple answer is Yes and Yes :globe_with_meridians:, IPFS uses libp2p, a modular network stack that enables IPFS to use transports like: WebRTC, WebSockets, HTTP, uTP, TCP and QUIC to name a few. However, if no WebRTC is available, it means that the other transport used (namely for the browser it will have to be WebSockets or HTTP), will need to be ‘upgraded’ to be able to do things like Relay/TURN, but that is also part of the libp2p modular stack. See more here: https://github.com/libp2p/js-libp2p