Skip to content

Commit e9e894f

Browse files
authored
fix: enable liveui on more livestreams (#7502)
Some live streams with a 30s live window can actually fluctuate between below and above the 30s threshold we have. Instead, we should have a slightly lower default to have those streams get the liveui.
1 parent b1760c5 commit e9e894f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/guides/options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,9 @@ and you will not be able click the text to seek to the live edge. `liveui` will
279279
### `liveTracker.trackingThreshold`
280280

281281
> Type: `number`
282-
> Default: `30`
282+
> Default: `20`
283283
284-
An option for the liveTracker component of the player that controls when the liveui should be shown. By default if a stream has less than 30s on the seekBar then we do not show the new liveui even with the liveui option set.
284+
An option for the liveTracker component of the player that controls when the liveui should be shown. By default if a stream has less than 20s on the seekBar then we do not show the new liveui even with the liveui option set.
285285

286286
### `liveTracker.liveTolerance`
287287

src/js/live-tracker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import window from 'global/window';
66
import * as Fn from './utils/fn.js';
77

88
const defaults = {
9-
trackingThreshold: 30,
9+
trackingThreshold: 20,
1010
liveTolerance: 15
1111
};
1212

@@ -28,7 +28,7 @@ class LiveTracker extends Component {
2828
* @param {Object} [options]
2929
* The key/value store of player options.
3030
*
31-
* @param {number} [options.trackingThreshold=30]
31+
* @param {number} [options.trackingThreshold=20]
3232
* Number of seconds of live window (seekableEnd - seekableStart) that
3333
* media needs to have before the liveui will be shown.
3434
*

test/unit/seek-to-live.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ QUnit.test('liveui disabled live window is never shown', function(assert) {
8484

8585
// liveui false
8686
this.player.options_.liveui = false;
87-
this.player.seekable = () => createTimeRange(0, 29);
87+
this.player.seekable = () => createTimeRange(0, 19);
8888
this.player.duration(Infinity);
8989

9090
assert.equal(this.getComputedDisplay(), 'none', 'is hidden');

0 commit comments

Comments
 (0)