Skip to content

Commit

Permalink
docs: add hlsPlayback.loadSourceBeforePlay info
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopaulovieira committed Jan 31, 2021
1 parent e4055c8 commit 6df510b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ var player = new Clappr.Player(
hlsUseNextLevel: false,
hlsMinimumDvrSize: 60,
hlsRecoverAttempts: 16,
hlsPlayback: {
loadSourceBeforePlay: true,
},
playback: {
extrapolatedWindowNumSegments: 2,
triggerFatalErrorOnResourceDenied: false,
Expand Down Expand Up @@ -83,6 +86,26 @@ The `hls.js` have recover approaches for some fatal errors. This option sets the
If this option is set to true, the playback will triggers fatal error event if decrypt key http response code is greater than or equal to 400. This option is used to attempt to reproduce iOS devices behaviour which internally use html5 video playback.

#### hlsPlayback
> Soon (in a new breaking change version), all options related to this playback that are declared in the scope of the `options` object will have to be declared necessarily within this new scope!
Groups all options related directly to `HlsjsPlayback` configs.

```javascript
var player = new Clappr.Player(
{
...
hlsPlayback: {
loadSourceBeforePlay: true,
},
});
```

#### `hlsPlayback.loadSourceBeforePlay`
> Default value: `true`
Configures whether the source should be loaded as soon as the `HLS.JS` internal reference is setup or only after the first play.

#### hlsjsConfig

As `HlsjsPlayback` is based on `hls.js`, it's possible to use the available `hls.js` configs too. You can check them out [here](https://github.com/video-dev/hls.js/blob/master/docs/API.md#fine-tuning).
Expand Down

0 comments on commit 6df510b

Please sign in to comment.