diff --git a/docs/tutorials/faq.md b/docs/tutorials/faq.md index 9faddee816..eb9824f6cf 100644 --- a/docs/tutorials/faq.md +++ b/docs/tutorials/faq.md @@ -191,19 +191,6 @@ the ad blocker in compiled mode as well.
false
.
* @property {boolean} ignoreMinBufferTime
* If true will cause DASH parser to ignore minBufferTime
from
- * manifest. It allows player config to take precedence over manifest for
- * rebufferingGoal
.
+ * manifest.
* false
.
* @property {boolean} autoCorrectDrift
diff --git a/lib/dash/dash_parser.js b/lib/dash/dash_parser.js
index a816901781..069affbfd1 100644
--- a/lib/dash/dash_parser.js
+++ b/lib/dash/dash_parser.js
@@ -643,13 +643,6 @@ shaka.dash.DashParser = class {
}
this.manifestPatchContext_.availabilityTimeOffset = availabilityTimeOffset;
- const ignoreMinBufferTime = this.config_.dash.ignoreMinBufferTime;
- let minBufferTime = 0;
- if (!ignoreMinBufferTime) {
- minBufferTime =
- TXml.parseAttr(mpd, 'minBufferTime', TXml.parseDuration) || 0;
- }
-
this.updatePeriod_ = /** @type {number} */ (TXml.parseAttr(
mpd, 'minimumUpdatePeriod', TXml.parseDuration, -1));
@@ -702,6 +695,12 @@ shaka.dash.DashParser = class {
}
}
} else {
+ const ignoreMinBufferTime = this.config_.dash.ignoreMinBufferTime;
+ let minBufferTime = 0;
+ if (!ignoreMinBufferTime) {
+ minBufferTime =
+ TXml.parseAttr(mpd, 'minBufferTime', TXml.parseDuration) || 0;
+ }
// DASH IOP v3.0 suggests using a default delay between minBufferTime
// and timeShiftBufferDepth. This is literally the range of all
// feasible choices for the value. Nothing older than
@@ -799,10 +798,7 @@ shaka.dash.DashParser = class {
await contentSteeringPromise;
- // Set minBufferTime to 0 for low-latency DASH live stream to achieve the
- // best latency
if (this.lowLatencyMode_) {
- minBufferTime = 0;
const presentationDelay = suggestedPresentationDelay != null ?
suggestedPresentationDelay : this.config_.defaultPresentationDelay;
presentationTimeline.setDelay(presentationDelay);
@@ -818,7 +814,6 @@ shaka.dash.DashParser = class {
textStreams: this.periodCombiner_.getTextStreams(),
imageStreams: this.periodCombiner_.getImageStreams(),
offlineSessionIds: [],
- minBufferTime: minBufferTime || 0,
sequenceMode: this.config_.dash.sequenceMode,
ignoreManifestTimestampsInSegmentsMode: false,
type: shaka.media.ManifestParser.DASH,
diff --git a/lib/hls/hls_parser.js b/lib/hls/hls_parser.js
index 3834cc560f..14a06556d8 100644
--- a/lib/hls/hls_parser.js
+++ b/lib/hls/hls_parser.js
@@ -1002,7 +1002,6 @@ shaka.hls.HlsParser = class {
textStreams,
imageStreams,
offlineSessionIds: [],
- minBufferTime: 0,
sequenceMode: this.config_.hls.sequenceMode,
ignoreManifestTimestampsInSegmentsMode:
this.config_.hls.ignoreManifestTimestampsInSegmentsMode,
diff --git a/lib/media/playhead.js b/lib/media/playhead.js
index 35b0a90108..0d56428480 100644
--- a/lib/media/playhead.js
+++ b/lib/media/playhead.js
@@ -231,9 +231,6 @@ shaka.media.MediaSourcePlayhead = class {
/** @private {shaka.media.PresentationTimeline} */
this.timeline_ = manifest.presentationTimeline;
- /** @private {number} */
- this.minBufferTime_ = manifest.minBufferTime || 0;
-
/** @private {?shaka.extern.StreamingConfiguration} */
this.config_ = config;
@@ -482,10 +479,7 @@ shaka.media.MediaSourcePlayhead = class {
const isBuffered = (playheadTime) => shaka.media.TimeRangesUtils.isBuffered(
this.mediaElement_.buffered, playheadTime);
- const rebufferingGoal = Math.max(
- this.minBufferTime_,
- this.config_.rebufferingGoal);
-
+ const rebufferingGoal = this.config_.rebufferingGoal;
const safeSeekOffset = this.config_.safeSeekOffset;
let start = this.timeline_.getSeekRangeStart();
diff --git a/lib/media/streaming_engine.js b/lib/media/streaming_engine.js
index eca072ed05..43a788b0ba 100644
--- a/lib/media/streaming_engine.js
+++ b/lib/media/streaming_engine.js
@@ -779,9 +779,7 @@ shaka.media.StreamingEngine = class {
// If the new segment can be finished in time without risking a buffer
// underflow, we should abort the old one and switch.
const bufferedAhead = (bufferEnd || 0) - presentationTime;
- const safetyBuffer = Math.max(
- this.manifest_.minBufferTime || 0,
- this.config_.rebufferingGoal);
+ const safetyBuffer = this.config_.rebufferingGoal;
const safeBufferedAhead = bufferedAhead - safetyBuffer;
if (timeToFetchNewSegment < safeBufferedAhead) {
return true;
@@ -1366,9 +1364,7 @@ shaka.media.StreamingEngine = class {
'bufferedAhead=' + bufferedAhead);
const unscaledBufferingGoal = Math.max(
- this.manifest_.minBufferTime || 0,
- this.config_.rebufferingGoal,
- this.config_.bufferingGoal);
+ this.config_.rebufferingGoal, this.config_.bufferingGoal);
const scaledBufferingGoal = Math.max(1,
unscaledBufferingGoal * this.bufferingScale_);
diff --git a/lib/mss/mss_parser.js b/lib/mss/mss_parser.js
index f8be5fc390..a2cea2585d 100644
--- a/lib/mss/mss_parser.js
+++ b/lib/mss/mss_parser.js
@@ -431,7 +431,6 @@ shaka.mss.MssParser = class {
textStreams: context.textStreams,
imageStreams: [],
offlineSessionIds: [],
- minBufferTime: 0,
sequenceMode: this.config_.mss.sequenceMode,
ignoreManifestTimestampsInSegmentsMode: false,
type: shaka.media.ManifestParser.MSS,
diff --git a/lib/offline/manifest_converter.js b/lib/offline/manifest_converter.js
index 6d22d3310b..b07c6e9cc7 100644
--- a/lib/offline/manifest_converter.js
+++ b/lib/offline/manifest_converter.js
@@ -84,7 +84,6 @@ shaka.offline.ManifestConverter = class {
return {
presentationTimeline: timeline,
- minBufferTime: 2,
offlineSessionIds: manifestDB.sessionIds,
variants: Array.from(variants.values()),
textStreams: textStreams,
diff --git a/lib/player.js b/lib/player.js
index b68c4f0800..660c00e4ee 100644
--- a/lib/player.js
+++ b/lib/player.js
@@ -2638,13 +2638,8 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
this.playheadObservers_ =
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
- // components being initialized.
- const rebufferThreshold = Math.max(
- this.manifest_.minBufferTime,
- this.config_.streaming.rebufferingGoal);
- this.startBufferManagement_(mediaElement, rebufferThreshold);
+ this.startBufferManagement_(
+ mediaElement, this.config_.streaming.rebufferingGoal);
};
if (!this.config_.streaming.startAtSegmentBoundary) {
@@ -4187,12 +4182,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
this.onAbrStatusChanged_();
}
if (this.bufferObserver_) {
- let rebufferThreshold = this.config_.streaming.rebufferingGoal;
- if (this.manifest_) {
- rebufferThreshold =
- Math.max(rebufferThreshold, this.manifest_.minBufferTime);
- }
- this.updateBufferingSettings_(rebufferThreshold);
+ this.updateBufferingSettings_(this.config_.streaming.rebufferingGoal);
}
if (this.manifest_) {
diff --git a/test/dash/dash_parser_manifest_unit.js b/test/dash/dash_parser_manifest_unit.js
index 74bfb04732..d84df6138a 100644
--- a/test/dash/dash_parser_manifest_unit.js
+++ b/test/dash/dash_parser_manifest_unit.js
@@ -170,7 +170,6 @@ describe('DashParser Manifest', () => {
manifest.sequenceMode = true;
manifest.type = shaka.media.ManifestParser.DASH;
manifest.anyTimeline();
- manifest.minBufferTime = 75;
manifest.addPartialVariant((variant) => {
variant.language = 'en';
variant.bandwidth = 200;
@@ -256,7 +255,6 @@ describe('DashParser Manifest', () => {
manifest.sequenceMode = false;
manifest.type = shaka.media.ManifestParser.DASH;
manifest.anyTimeline();
- manifest.minBufferTime = 75;
manifest.addPartialVariant((variant) => {
variant.language = 'en';
variant.bandwidth = 200;
@@ -1759,56 +1757,6 @@ describe('DashParser Manifest', () => {
expect(stream).toBeUndefined();
});
- it('override manifest value if ignoreMinBufferTime is true', async () => {
- const manifestText = [
- '