mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +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(' ')}/>`);
|
||||
}
|
||||
|
||||
const encodedURL = Misc.encodeHTML(stream.url);
|
||||
const modURL = stream.url
|
||||
.replace('?', '/')
|
||||
.replace(/&/g, '/')
|
||||
.replace(/=/g, '/');
|
||||
|
||||
const segRange = `${stream.indexRange.start}-${stream.indexRange.end}`;
|
||||
const initRange = `${stream.initRange.start}-${stream.initRange.end}`;
|
||||
|
||||
repArr.push(
|
||||
` <BaseURL>${encodedURL}</BaseURL>`,
|
||||
`<!-- FIXME: causes string query omission bug in dashdemux`,
|
||||
` <BaseURL>${modURL}</BaseURL>`,
|
||||
` <SegmentBase indexRange="${segRange}">`,
|
||||
` <Initialization range="${initRange}"/>`,
|
||||
` </SegmentBase>`,
|
||||
`-->`,
|
||||
` </Representation>`,
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user