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
path: root/docs
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2018-04-20 02:41:34 +0300
committerFeross Aboukhadijeh <feross@feross.org>2018-04-20 02:49:13 +0300
commitfbbffbbb445096a909c851cdc4ca15204b9952b9 (patch)
tree4c6426b895a9b2e3eca99b2fe5ad04f943fe5bea /docs
parentb45c3f8fb594d38799739b309d53113c7559e6e9 (diff)
Update documentation for render-media@3
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/api.md b/docs/api.md
index 4f17582..52d1125 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -543,10 +543,16 @@ will be shown in. A new DOM node will be created for the content and appended to
If provided, `opts` can contain the following options:
-- `autoplay`: Autoplay video/audio files (default: `true`)
+- `autoplay`: Autoplay video/audio files (default: `false`)
+- `muted`: Mute video/audio files (default: `false`)
- `controls`: Show video/audio player controls (default: `true`)
- `maxBlobLength`: Files above this size will skip the "blob" strategy and fail (default: `200 * 1000 * 1000` bytes)
+Note: Modern browsers tend to block media that autoplays with audio (here's the
+[Chrome policy](https://developers.google.com/web/updates/2017/09/autoplay-policy-changes)
+for instance) so if you set `autoplay` to `true`, it's a good idea to also set
+`muted` to `true`.
+
If provided, `callback` will be called once the file is visible to the user.
`callback` is called with an `Error` (or `null`) and the new DOM node that is
displaying the content.