Skip to content

Commit

Permalink
Stream url with semi colon not playing
Browse files Browse the repository at this point in the history
  • Loading branch information
JD Buys committed Dec 1, 2020
1 parent 7021712 commit 056e093
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion TritonPlayerSDK/Classes/Player/TDStreamPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ -(void)play {
queryParameters = [queryParameters stringByAppendingString:@"banners=none"];
}


BOOL removePercentEncoding = FALSE;
if ([self.streamURL containsString:@"/;"]) {
removePercentEncoding = TRUE;
}
//concat all query params
NSURLComponents *url = [[NSURLComponents alloc] initWithString:self.streamURL];
NSArray *tdQueryParams = [queryParameters componentsSeparatedByString:@"&"];
Expand All @@ -194,7 +199,8 @@ -(void)play {
}

[url setQueryItems:queryItems];
NSMutableString *connectingToURL = [NSMutableString stringWithFormat:@"%@", [url string]];
NSMutableString *connectingToURL = [NSMutableString stringWithFormat:@"%@",
((removePercentEncoding) ? [[url string] stringByRemovingPercentEncoding] : [url string]) ];

if (self.profile == kTDStreamProfileFLV) {
[self.player updateSettings:@{SettingsFLVPlayerUserAgentKey : self.userAgent,
Expand Down

0 comments on commit 056e093

Please sign in to comment.