Skip to content

Commit

Permalink
Merge pull request #1306 from canalplus/fix/smooth-segment-loader
Browse files Browse the repository at this point in the history
Fix usage of an external segmentLoader when playing smooth streaming contents
  • Loading branch information
peaBerberian authored Oct 26, 2023
2 parents 6bb040d + 779ffca commit 5bbf047
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/transports/smooth/segment_loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ function regularSegmentLoader(
*/
const generateSegmentLoader = ({
checkMediaSegmentIntegrity,
customSegmentLoader,
segmentLoader,
} : {
checkMediaSegmentIntegrity? : boolean | undefined;
customSegmentLoader? : ICustomSegmentLoader | undefined;
segmentLoader? : ICustomSegmentLoader | undefined;
}) => (
url : string | null,
context : ISegmentContext,
Expand Down Expand Up @@ -154,7 +154,7 @@ const generateSegmentLoader = ({
return Promise.resolve({ resultType: "segment-created" as const,
resultData: null });
} else {
if (typeof customSegmentLoader !== "function") {
if (typeof segmentLoader !== "function") {
return regularSegmentLoader(url,
context,
callbacks,
Expand Down Expand Up @@ -266,7 +266,7 @@ const generateSegmentLoader = ({
byteRanges,
trackType: context.type,
url };
const abort = customSegmentLoader(args, customCallbacks);
const abort = segmentLoader(args, customCallbacks);

cancelSignal.register(abortCustomLoader);

Expand Down

0 comments on commit 5bbf047

Please sign in to comment.