Skip to content

Commit 5052126

Browse files
committed
Do not use Fetch API when requesting partial segments
1 parent 0af743c commit 5052126

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

src/dash/DashHandler.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ function DashHandler(config) {
166166
request.mediaType = getType();
167167
request.bandwidth = representation.bandwidth;
168168
request.type = HTTPRequest.MEDIA_SEGMENT_TYPE;
169+
request.isPartialSegmentRequest = segment.isPartialSegment;
169170
request.range = segment.mediaRange;
170171
request.startTime = segment.presentationStartTime;
171172
request.mediaStartTime = segment.mediaStartTime;

src/dash/vo/Segment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class Segment {
4242
// The index of the segment in the list of segments. We start at 0
4343
this.index = null;
4444
this.indexRange = null;
45+
this.isPartialSegment = false;
4546
this.media = null;
4647
this.mediaRange = null;
4748
this.mediaUrl = null;

src/streaming/net/HTTPLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ function HTTPLoader(cfg) {
557557
let loader;
558558
let fileLoaderType;
559559

560-
if (request.hasOwnProperty('availabilityTimeComplete') && request.availabilityTimeComplete === false && window.fetch && request.responseType === 'arraybuffer' && request.type === HTTPRequest.MEDIA_SEGMENT_TYPE) {
560+
if (!request.isPartialSegmentRequest && request.hasOwnProperty('availabilityTimeComplete') && request.availabilityTimeComplete === false && window.fetch && request.responseType === 'arraybuffer' && request.type === HTTPRequest.MEDIA_SEGMENT_TYPE) {
561561
if (!fetchLoader) {
562562
fetchLoader = FetchLoader(context).create();
563563
fetchLoader.setConfig({

src/streaming/vo/FragmentRequest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class FragmentRequest {
4848
this.endDate = null;
4949
this.firstByteDate = null;
5050
this.index = NaN;
51+
this.isPartialSegmentRequest = false;
5152
this.mediaStartTime = NaN;
5253
this.mediaType = null;
5354
this.range = null;

0 commit comments

Comments
 (0)