Closed GoogleCodeExporter closed 9 years ago
For anyone passing by with the same issue, we worked around it by hijacking
XMLHttpRequest's open method to correct the URL before the request is made:
<code language="javascript">
var superOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function open() {
arguments[1] = arguments[1].replace(/\?base=\/some-bucket\//, '?base=%2fsome-bucket%2f');
return superOpen.apply(this, arguments);
};
</code>
You can use RegExp capture groups if you have dynamic portions in between.
Original comment by j...@pivotshare.com
on 4 Dec 2014 at 12:48
You could also use MPL's host.updateSegmentRequestInfo to correct the url.
Original comment by vadi...@google.com
on 4 Dec 2014 at 11:34
^^ Much cleaner. Thank you very much.
Original comment by j...@pivotshare.com
on 4 Dec 2014 at 11:36
In our case, we needed to use `host.updateManifestRequestInfo` instead since
this is a manifest-url issue for us, though looking through the library source
it's likely this would impact segment URLs as well if they contained encoded
forward slashes.
Original comment by j...@pivotshare.com
on 4 Dec 2014 at 11:42
Closing this issue since there is an existing workaround and we believe this is
intended behavior.
Original comment by jonathan...@google.com
on 5 Dec 2014 at 7:36
Original issue reported on code.google.com by
j...@pivotshare.com
on 3 Dec 2014 at 7:55