Swift 3: How to set multiple cookies for JWPlayer for HLS Streaming

As I'm using JWPlayer for HLS Streaming at iOS side. For Streaming we have secure Video url to play content in iOS device. For that we are using cloud front domain. What I want is, our web has integrated cloudfront signed cookie where we need to set cookies for cloudfront domain, Is this we can achieve using JW Player in Ios device?

Please refer below URL for more details,

http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-cookies.html


let cookies = "cookiesKey=value;cookiesKey=value...."

let config = JWConfig(containtURL:"your url") config.assetOptions = ["AVURLAssetHTTPHeaderFieldsKey":["cookie":cookies]]

as above code of cookies, create your cookies string with key and value pair and separated by semicolon and use this as cookie in assetOptions.


是的,你可以举例来说,

NSString *cookies = "cookies1=value;cookies2=value" 
JWConfig *config = [[JWConfig alloc] initWithContentUrl:@"your url"];
config.assetOptions = @{@"AVURLAssetHTTPHeaderFieldsKey":@{@"cookie": cookies}};
链接地址: http://www.djcxy.com/p/68478.html

上一篇: 它可以处理多个日期吗?

下一篇: Swift 3:如何为HLS Streaming设置JWPlayer的多个Cookie