diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-01-04 12:31:36 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-01-04 12:31:36 +0300 |
commit | 65db14f353519d9a18f350ed5938119ef37f54a8 (patch) | |
tree | d60d24c18b1e78b3bf85accbf03d7e53d4ef7639 /README.md | |
parent | 3f75dbd2f735f45a19c3cd679b6f957baf0071c6 (diff) |
add CDN script link to readme
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -21,10 +21,11 @@ In the browser, WebTorrent uses **WebRTC** (data channels) for peer-to-peer tran It can be used **without** browser plugins, extensions, or installations. It's Just JavaScript™. -Simply include the `webtorrent.min.js` script on your page to start fetching files over -WebRTC using the BitTorrent protocol, or `require('webtorrent')` with -[browserify](http://browserify.org/). See [demo apps](#webtorrent-in-production) and -[code examples](#usage) below. +Simply include the +[`webtorrent.min.js`](https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js) script +on your page to start fetching files over WebRTC using the BitTorrent protocol, or +`require('webtorrent')` with [browserify](http://browserify.org/). See [demo apps +](#webtorrent-in-production) and [code examples](#usage) below. To make BitTorrent work over WebRTC (which is the only p2p transport that works on the web) we made some protocol changes. Therefore, a browser-based WebTorrent client can only @@ -180,6 +181,13 @@ object, so it can be used with just a script tag: <script src="webtorrent.min.js"></script> ``` +The WebTorrent script is also hosted on fast, reliable CDN infrastructure (Cloudflare and +MaxCDN) for easy inclusion on your site: + +```html +<script src="https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js"></script> +``` + #### In node.js WebTorrent also works in node.js, using the *same npm module!* It's mad science! |