1. Heitor Canabal's Avatar
    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+aDJu75X6rOZlZwtCAeqjNMCanEcB0lOM5XZN Mkix8XmP/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!
    03-20-2015 01:49 PM
  2. Just_Me_D's Avatar
    Your best bet would be to contact the developers via their support site.

    http://www.eplayworks.com/section/su...p?gm=3&lang=en
    03-20-2015 02:55 PM
  3. yww's Avatar
    hey,I found that if the content type of your response is "application/octet-stream" ,the avplayer will nerver work,try to change it to "audio/mpeg"
    10-21-2015 11:29 PM

Similar Threads

  1. Odd Issue With An App!
    By Ledsteplin in forum iPhone Apps & Games
    Replies: 6
    Last Post: 03-20-2015, 09:15 PM
  2. Is this a deal or not?
    By TLD1 in forum MacBook Pro
    Replies: 3
    Last Post: 03-20-2015, 01:56 PM
  3. Best iPhone apps to help you plan the perfect wedding
    By iMore.com in forum iMore.com News Discussion
    Replies: 0
    Last Post: 03-20-2015, 12:22 PM
  4. New Apple TV will reportedly debut in June with an App Store and Siri
    By iMore.com in forum iMore.com News Discussion
    Replies: 0
    Last Post: 03-20-2015, 11:30 AM
  5. BBM Protected now supports the iPhone for more secure messaging
    By iMore.com in forum iMore.com News Discussion
    Replies: 0
    Last Post: 03-20-2015, 11:00 AM
LINK TO POST COPIED TO CLIPBOARD