Closed defagos closed 1 year ago
The code removed in the related library https://github.com/SRGSSR/srganalytics-apple/pull/68 modified the stream url to add __b__=800
query parameter, including to all other query parameters, a value encoding.
TL;DR
âšī¸ On SRF stage, no url modification by the player (vod-stage.srf.ch
). On SRF prod, url is modified by the player (srf-vod-amd.akamaized.net
) and the new url is not playable.
Without the startBitRate
property, which was implemented for Akamai MSL3 packaging solution, the played url is not modified anymore, even if the hostname contains "akamai".
Here is why it played on SRF stage and not in SRF prod:đ
The code to add __b__
parameter:
NSUInteger startBitRate = preferredSettings.startBitRate;
if (startBitRate != 0 && [URL.host containsString:@"akamai"] && [URL.path.pathExtension isEqualToString:@"m3u8"]) {
NSURLComponents *URLComponents = [NSURLComponents componentsWithURL:URL resolvingAgainstBaseURL:NO];
NSMutableArray<NSURLQueryItem *> *queryItems = URLComponents.queryItems.mutableCopy ?: [NSMutableArray array];
[queryItems addObject:[NSURLQueryItem queryItemWithName:@"__b__" value:@(startBitRate).stringValue]];
URLComponents.queryItems = queryItems.copy;
URL = URLComponents.URL;
}
__b__
added, no url parameters encoded.__b__
added, and url parameters encoded. =
converted to %3D
.It explains why nobody catched this issue on SRF stage environnement, and only in production environment.
With this PR, no more startBitRate
property, which was implemented for Akamai MSL3 packaging solution. The played url is now not modified anymore, even if the hostname contains "akamai".
Pull request
Description
This PR removes bit rate support since it does not work anymore.
Changes made