Skip to content

Commit

Permalink
fixed: stall when unbuffered seek to position 0 with audio codec mp3 …
Browse files Browse the repository at this point in the history
…because of timestampOffset 0
  • Loading branch information
wakabayashik committed Apr 5, 2024
1 parent 8f02abe commit 6b15589
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/mse-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ class MSEController {
if (pendingSegments[type].length > 0) {
let segment = pendingSegments[type].shift();

if (segment.timestampOffset) {
if (typeof segment.timestampOffset === 'number' && isFinite(segment.timestampOffset)) {
// For MPEG audio stream in MSE, if unbuffered-seeking occurred
// We need explicitly set timestampOffset to the desired point in timeline for mpeg SourceBuffer.
let currentOffset = this._sourceBuffers[type].timestampOffset;
Expand Down

0 comments on commit 6b15589

Please sign in to comment.