Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2019-08-09 08:38:02 +0300
committerFeross Aboukhadijeh <feross@feross.org>2019-08-09 08:38:02 +0300
commit3f4119377147c568aeadf73f602fa832ee2d46f3 (patch)
tree912e3b2dcf5a7a8cc822c861843b9d561cc718c4 /README.md
parent7c31b0f691ea781416db869fcc8ceb26b225aaf3 (diff)
readme: add Chrome App usage instructions
Diffstat (limited to 'README.md')
-rw-r--r--README.md34
1 files changed, 16 insertions, 18 deletions
diff --git a/README.md b/README.md
index 219fd82..cf5c958 100644
--- a/README.md
+++ b/README.md
@@ -175,8 +175,8 @@ you use [node](http://nodejs.org/)-style require() to organize your browser code
##### Webpack
-WebTorrent also works with [webpack](http://webpack.github.io/), a module bundler similar
-to browserify. However, webpack requires the following extra configuration:
+WebTorrent also works with [webpack](https://webpack.js.org/), another module
+bundler. However, webpack requires the following extra configuration:
```js
{
@@ -187,22 +187,8 @@ to browserify. However, webpack requires the following extra configuration:
}
```
-If you are on webpack 1.x, you will also need to add the `json-loader`:
-```js
-{
- module: {
- loaders: [
- // make sure to install the 'json-loader' package: npm install json-loader
- {
- test: /\.json$/,
- loader: 'json'
- }
- ]
- }
-}
-```
-
-Otherwise you could also directly use the pre-built version via `require('webtorrent/webtorrent.min')`.
+Or, you can just use the pre-built version via
+`require('webtorrent/webtorrent.min.js')` and skip the webpack configuration.
##### Script tag
@@ -221,6 +207,18 @@ MaxCDN) for easy inclusion on your site:
<script src="https://cdn.jsdelivr.net/npm/webtorrent@latest/webtorrent.min.js"></script>
```
+##### Chrome App
+
+If you want to use WebTorrent in a
+[Chrome App](https://developer.chrome.com/apps/about_apps), you can include the
+following script:
+
+```html
+<script src="webtorrent.chromeapp.js"></script>
+```
+
+Be sure to enable the `chrome.sockets.udp` and `chrome.sockets.tcp` permissions!
+
#### In Node.js
WebTorrent also works in node.js, using the *same npm package!* It's mad science!