Hi!
I am trying to play an mp4 video from an URL but it does not work. That is my code:
AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:[NSURL URLWithString:#MY_URL#]];
avPlayer = [AVPlayer playerWithPlayerItemlayerItem];
I tested the same code with an S3 (Amazon AWS) URL and worked.
I used an chrome plugin to get header of the two URLs to see the difference.
Amazon S3 header response:
Status Code: 200
Date: Fri, 20 Mar 2015 11:11:50 GMT
Last-Modified: Thu, 19 Mar 2015 13:46:30 GMT
Server: AmazonS3
x-amz-request-id: DE5FE905604FA9F1
ETag: "9601ded7e0a0652216ec243632f062d7"
Content-Type: application/octet-stream
Accept-Ranges: bytes
Content-Length: 554344
x-amz-id-2: 8kNyctTB5Hz8J+aDJu75X6rOZlZwtCAeqjNMCanEcB0lOM5XZNMkix8XmP/9p1ZRhpzLu3Vidnk=
URL that not work header response:
Status Code: 200
Date: Fri, 20 Mar 2015 11:26:21 GMT
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Apache
Transfer-Encoding: chunked
Content-Type: application/octet-stream
Access-Control-Allow-Origin: *
Content-Disposition: inline; filename=CHAMADO_297_0.63640400 1426796516.mp4
Connection: Keep-Alive
Keep-Alive: timeout=5, max=500
What is the error?
Thanks!
I am trying to play an mp4 video from an URL but it does not work. That is my code:
AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:[NSURL URLWithString:#MY_URL#]];
avPlayer = [AVPlayer playerWithPlayerItemlayerItem];
I tested the same code with an S3 (Amazon AWS) URL and worked.
I used an chrome plugin to get header of the two URLs to see the difference.
Amazon S3 header response:
Status Code: 200
Date: Fri, 20 Mar 2015 11:11:50 GMT
Last-Modified: Thu, 19 Mar 2015 13:46:30 GMT
Server: AmazonS3
x-amz-request-id: DE5FE905604FA9F1
ETag: "9601ded7e0a0652216ec243632f062d7"
Content-Type: application/octet-stream
Accept-Ranges: bytes
Content-Length: 554344
x-amz-id-2: 8kNyctTB5Hz8J+aDJu75X6rOZlZwtCAeqjNMCanEcB0lOM5XZNMkix8XmP/9p1ZRhpzLu3Vidnk=
URL that not work header response:
Status Code: 200
Date: Fri, 20 Mar 2015 11:26:21 GMT
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Apache
Transfer-Encoding: chunked
Content-Type: application/octet-stream
Access-Control-Allow-Origin: *
Content-Disposition: inline; filename=CHAMADO_297_0.63640400 1426796516.mp4
Connection: Keep-Alive
Keep-Alive: timeout=5, max=500
What is the error?
Thanks!