0

I'm trying to parse streaming video websites in order to play them in an iPad/iPhone app. For example, in www.veetle.com, opening a channel with an iPad or iPhone you can see the video, because the code for this finds a .m3u (or .m3u8) file which can be played. But opening from a computer browser, or parsing the channel address in Xcode doesn't show you this .m3u file, it uses flash.

What I want is to get this .m3u file to be able to play the channel, I have been searching all around the web how to open a website as a mobile in Xcode, but I haven't found anything. Any idea? Thanks.

mrolo
  • 1
  • 3

1 Answers1

1

You need to change the so called user agent string in your request.

See here: Changing the userAgent of NSURLConnection and here: What is the iOS 5.0 user agent string?

Developer tools for safari also offers the ability so quickly change the user agent which is nice if you just want to quickly check a site: http://designshack.net/articles/developer-tools-in-safari/

Use eg this to see your current user agent: https://duckduckgo.com/?q=user+agent+

Community
  • 1
  • 1
Tobias
  • 4,034
  • 1
  • 28
  • 35
  • Thanks,that worked perfectly. For some servers this was enough, however, in veetle, I can't get the file from the code source, I have to go to the web inspector of safari to find the .m3u. Is there a way to do this in Xcode? – mrolo May 10 '12 at 17:19
  • Sorry, cannot help you with this since I don't know what veetle does differently. Maybe consider asking a new question containing additional information about your problem with veetle. – Tobias May 10 '12 at 20:05