Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>short answer: yes</strong> if they are ID3v2 tags</p> <p><strong>which ID3 Tag version are you trying to read?</strong></p> <p><strong>ID3v1 tags</strong> are at the end of a file, in the last 128 bytes. With Net::HTTP it doesn't seem to be possible to seek forward towards the end of the file and read only the last N bytes. If you try that, using headers = {"Range" => "bytes=128-"} , it always seems to download the complete file. resp.body.size => file-size . But no big loss, because ID3 version 1 is pretty much outdated at this point because of it's limitations, such as fixed length format, only ASCII text, ...). iTunes uses ID3 version 2.2.0.</p> <p><strong>ID3v2 tags</strong> are at the beginning of a file - to support streaming - you can download the initial part of the MP3 file, which contains the ID3v2 header, via HTTP protocol >= 1.1</p> <p>I answered pretty much the same question before, which was specifically for a Ruby implementation.</p> <p><strong>Please check this Question:</strong> <a href="https://stackoverflow.com/questions/7656950/read-id3-tags-of-remote-mp3-file-in-ruby-rails">Read ID3 Tags of Remote MP3 File in Ruby/Rails?</a></p> <hr> <p><strong>Continued..</strong> The Ruby code in the other question I mentioned is a fully functioning example.</p> <p>You can set a pre-determined size of bytes you want to fetch which is large enough that you assume it contains the complete ID3-tag, e.g. 1000 bytes</p> <p>You then open an HTTP connection using your favourite HTTP library for whatever language you use, but make sure that the version of the HTTP-protocol is >= 1.1 , and you read the first 1000 Bytes using the HTTP option "Range" , which only downloads a given range of bytes from the file you are trying to access via HTTP.</p> <p>The concrete implementation on iOS depends on what libraries you use.</p> <p><strong>Here is an example in Objective-C for a GET request:</strong> <a href="https://stackoverflow.com/questions/9404104/simple-objective-c-get-request">Simple objective-c GET request</a></p> <p>All you need to do is to pass a Range-header to the request, which specifies the range.</p> <p>See API: <a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSMutableURLRequest_Class/Reference/Reference.html" rel="nofollow noreferrer">https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSMutableURLRequest_Class/Reference/Reference.html</a></p> <p>Also check the example for how the Range header field needs to be formatted:</p> <p><a href="http://en.wikipedia.org/wiki/List_of_HTTP_header_fields" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/List_of_HTTP_header_fields</a></p> <p>e.g. this is the syntax for the Range header:</p> <pre><code> Range: bytes=0-1000 </code></pre> <p>You'll need to set this header via the addValue:forHTTPHeaderField instance method.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload