Skip to content

Commit

Permalink
fix: ensure all timelineregionenter events are fired (#6713)
Browse files Browse the repository at this point in the history
Fixes #6711
  • Loading branch information
littlespex authored and joeyparrish committed May 31, 2024
1 parent 839b550 commit e1bec6b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
const setupPlayhead = (startTime) => {
this.playhead_ = this.createPlayhead(startTime);
this.playheadObservers_ =
this.createPlayheadObserversForMSE_(startTimeOfLoad);
this.createPlayheadObserversForMSE_(startTime);

// We need to start the buffer management code near the end because it
// will set the initial buffering state and that depends on other
Expand Down Expand Up @@ -2764,16 +2764,16 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
* Create the observers for MSE playback. These observers are responsible for
* notifying the app and player of specific events during MSE playback.
*
* @param {number} startTimeOfLoad
* @param {number} startTime
* @return {!shaka.media.PlayheadObserverManager}
* @private
*/
createPlayheadObserversForMSE_(startTimeOfLoad) {
createPlayheadObserversForMSE_(startTime) {
goog.asserts.assert(this.manifest_, 'Must have manifest');
goog.asserts.assert(this.regionTimeline_, 'Must have region timeline');
goog.asserts.assert(this.video_, 'Must have video element');

const startsPastZero = this.isLive() || startTimeOfLoad > 0;
const startsPastZero = this.isLive() || startTime > 0;

// Create the region observer. This will allow us to notify the app when we
// move in and out of timeline regions.
Expand Down

0 comments on commit e1bec6b

Please sign in to comment.