Always set headers for iOS (#2014)
This commit is contained in:
@@ -497,13 +497,10 @@ static int const RCTVideoUnset = -1;
|
||||
NSMutableDictionary *assetOptions = [[NSMutableDictionary alloc] init];
|
||||
|
||||
if (isNetwork) {
|
||||
/* Per #1091, this is not a public API.
|
||||
* We need to either get approval from Apple to use this or use a different approach.
|
||||
NSDictionary *headers = [source objectForKey:@"requestHeaders"];
|
||||
if ([headers count] > 0) {
|
||||
[assetOptions setObject:headers forKey:@"AVURLAssetHTTPHeaderFieldsKey"];
|
||||
}
|
||||
*/
|
||||
NSDictionary *headers = [source objectForKey:@"requestHeaders"];
|
||||
if ([headers count] > 0) {
|
||||
[assetOptions setObject:headers forKey:@"AVURLAssetHTTPHeaderFieldsKey"];
|
||||
}
|
||||
NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies];
|
||||
[assetOptions setObject:cookies forKey:AVURLAssetHTTPCookiesKey];
|
||||
|
||||
|
Reference in New Issue
Block a user