Skip to content

Commit

Permalink
IOController: Reduce live stashInitialSize to 384KB (same as vod)
Browse files Browse the repository at this point in the history
  • Loading branch information
xqq committed Dec 10, 2016
1 parent 560e209 commit 85d9fbf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ In multipart mode, `duration` `filesize` `url` field in `MediaDataSource` struct
| -------------------------- | --------- | ------------- | ---------------------------------------- |
| `enableWorker?` | `boolean` | `false` | Enable separated thread for transmuxing (unstable for now) |
| `enableStashBuffer?` | `boolean` | `true` | Enable IO stash buffer. Set to false if you need realtime (minimal latency) for live stream playback, but may stalled if there's network jittering. |
| `stashInitialSize?` | `number` | `384KB/512KB` | Indicates IO stash buffer initial size. Default is `384KB` for VOD, `512KB` for live stream. Indicate a suitable size can improve video load/seek time. |
| `stashInitialSize?` | `number` | `384KB` | Indicates IO stash buffer initial size. Default is `384KB`. Indicate a suitable size can improve video load/seek time. |
| `isLive?` | `boolean` | `false` | Same to `isLive` in **MediaDataSource**, ignored if has been set in MediaDataSource structure. |
| `lazyLoad?` | `boolean` | `true` | Abort the http connection if there's enough data for playback. |
| `lazyLoadMaxDuration` | `number` | `3 * 60` | Indicates how many seconds of data to be kept for `lazyLoad`. |
Expand Down
3 changes: 0 additions & 3 deletions src/io/io-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ class IOController {
this._extraData = extraData;

this._stashInitialSize = 1024 * 384; // default initial size: 384KB
if (config.isLive === true) {
this._stashInitialSize = 1024 * 512; // default live initial size: 512KB
}
if (config.stashInitialSize != undefined && config.stashInitialSize > 0) {
// apply from config
this._stashInitialSize = config.stashInitialSize;
Expand Down

0 comments on commit 85d9fbf

Please sign in to comment.