Skip to content

Commit c272f9a

Browse files
vanyaxkavelad
authored andcommitted
perf(player): avoid full configuration deep-clone in time update callback (#10098)
This PR replaces a full-config deep-clone in Player.getBufferFullness() with a direct read, removing a per-timeupdate allocation for playback sessions that have liveSync configured, or `vodDynamicPlaybackRate`
1 parent 0547031 commit c272f9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/player.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4832,7 +4832,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
48324832
const bufferedLength = this.video_.buffered.length;
48334833
const bufferedEnd =
48344834
bufferedLength ? this.video_.buffered.end(bufferedLength - 1) : 0;
4835-
const bufferingGoal = this.getConfiguration().streaming.bufferingGoal;
4835+
const bufferingGoal = this.config_.streaming.bufferingGoal;
48364836
const lengthToBeBuffered = Math.min(this.video_.currentTime +
48374837
bufferingGoal, this.seekRange().end);
48384838

0 commit comments

Comments
 (0)