From fbbffbbb445096a909c851cdc4ca15204b9952b9 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Thu, 19 Apr 2018 16:41:34 -0700 Subject: Update documentation for render-media@3 --- docs/api.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'docs') 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. -- cgit v1.2.3