Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/3808 #3823

Merged
merged 3 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dash/utils/TimelineSegmentsGetter.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function TimelineSegmentsGetter(config, isDynamic) {
// In some cases when requiredMediaTime = actual end time of the last segment
// it is possible that this time a bit exceeds the declared end time of the last segment.
// in this case we still need to include the last segment in the segment list.
if (requiredMediaTime < (scaledTime + (frag.d / fTimescale))) {
if ((requiredMediaTime < (scaledTime + (frag.d / fTimescale))) && requiredMediaTime >= scaledTime) {
let media = base.media;
let mediaRange = frag.mediaRange;

Expand Down
2 changes: 1 addition & 1 deletion src/streaming/StreamProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function StreamProcessor(config) {

// If this statement is true we are stuck. A static manifest does not change and we did not find a valid request for the target time
// There is no point in trying again. We need to adjust the time in order to find a valid request. This can happen if the user/app seeked into a gap.
if (settings.get().streaming.gaps.enableSeekFix && !isDynamic && shouldUseExplicitTimeForRequest && playbackController.isSeeking()) {
if (settings.get().streaming.gaps.enableSeekFix && !isDynamic && shouldUseExplicitTimeForRequest && (playbackController.isSeeking() || playbackController.getTime() === 0)) {
const adjustedTime = dashHandler.getValidSeekTimeCloseToTargetTime(bufferingTime, mediaInfo, representation, settings.get().streaming.gaps.threshold);
if (!isNaN(adjustedTime)) {
playbackController.seek(adjustedTime, false, false);
Expand Down