mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
YT: replace some URL chars with slashes instead encoding it
Avoid dashdemux string query omission bug by using URL path with slashes instead of query string
This commit is contained in:
10
src/dash.js
10
src/dash.js
@@ -155,17 +155,19 @@ function _getStreamRepresentation(stream)
|
|||||||
repArr.push(` <AudioChannelConfiguration ${audioConfArr.join(' ')}/>`);
|
repArr.push(` <AudioChannelConfiguration ${audioConfArr.join(' ')}/>`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const encodedURL = Misc.encodeHTML(stream.url);
|
const modURL = stream.url
|
||||||
|
.replace('?', '/')
|
||||||
|
.replace(/&/g, '/')
|
||||||
|
.replace(/=/g, '/');
|
||||||
|
|
||||||
const segRange = `${stream.indexRange.start}-${stream.indexRange.end}`;
|
const segRange = `${stream.indexRange.start}-${stream.indexRange.end}`;
|
||||||
const initRange = `${stream.initRange.start}-${stream.initRange.end}`;
|
const initRange = `${stream.initRange.start}-${stream.initRange.end}`;
|
||||||
|
|
||||||
repArr.push(
|
repArr.push(
|
||||||
` <BaseURL>${encodedURL}</BaseURL>`,
|
` <BaseURL>${modURL}</BaseURL>`,
|
||||||
`<!-- FIXME: causes string query omission bug in dashdemux`,
|
|
||||||
` <SegmentBase indexRange="${segRange}">`,
|
` <SegmentBase indexRange="${segRange}">`,
|
||||||
` <Initialization range="${initRange}"/>`,
|
` <Initialization range="${initRange}"/>`,
|
||||||
` </SegmentBase>`,
|
` </SegmentBase>`,
|
||||||
`-->`,
|
|
||||||
` </Representation>`,
|
` </Representation>`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user