Skip to content

Commit

Permalink
fix videoSegmentTimingInfo test
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Jul 17, 2019
1 parent fef73ea commit 42508d1
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions test/videojs-http-streaming.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4158,22 +4158,18 @@ QUnit.test('convertToProgramTime will return stream time if buffered', function(
this.standardXHRResponse(this.requests[1]);

const mpc = this.player.vhs.masterPlaylistController_;
const mainSegmentLoader_ = mpc.mainSegmentLoader_;

mpc.mainSegmentLoader_.one('appending', () => {
const videoBuffer = mpc.sourceUpdater_.videoBuffer;

mainSegmentLoader_.one('appending', () => {
// since we don't run through the transmuxer, we have to manually trigger the timing
// info callback
videoBuffer.trigger({
type: 'videoSegmentTimingInfo',
videoSegmentTimingInfo: {
prependedGopDuration: 0,
start: {
presentation: 0
},
end: {
presentation: 1
}
mainSegmentLoader_.handleVideoSegmentTimingInfo_(mainSegmentLoader_.pendingSegment_.requestId, {
prependedGopDuration: 0,
start: {
presentation: 0
},
end: {
presentation: 1
}
});
});
Expand Down

0 comments on commit 42508d1

Please sign in to comment.