Opening a website as an iPad/iPhone in xcode - iphone

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.

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+

Related

How to implement a media server for local music files on the phone in flutter that can be used by DLNA

I am working on a flutter app (for iOS and Android). One of the function of the app is to find DLNA renderes in the local network and allow user to play the local music files on his phone on these DLNA renderes. I have incorperated the DART-DLNA packagein my app and am Able to list all DLNA-UPNP devices and I can send a url of a media to the selected DLAN renderer and it starts playing. I can also control the play/pause and stop functions. So far so good
Now I want to be able to play the music files that are on the device from this app. When working on ANdrodi native earlier I used DroidUpnp which mainly uses cling and nanoHttpd libraries. Cling provides upnp stack and nanoHttpd is used for creating a webserver to server the media files. The DroidUpnp app lists the music content like this
On going depper when reached to the actual music file the app will send that file via upnp/dlna.
On Flutter I am not sure how to go for it? How to List those files and then get the files urls like http://192.168.1.190:8192/a-24684.mp3 and send it to the render.

Pulling songs from iOS music library into an App?

I am developing an HTML5 mobile application that should allow users to upload music directly into the application.
The music should be able to be pulled from:
Youtube (opens YouTube interface to insert YouTube link)
SoundCloud (opens SoundCloud profile to insert link/mp3)
Upload from Phone (open iOS music library within phone to select song to upload)
Question:
I want to allow the users to pick a song from their iOS native music library and upload it directly into the app as an mp3.
I've read that a possible solution is to copy the raw song data to the App Storage Directory via the AVAssetReader.
Any other good solutions?
Im going to assume then this is a hybrid so the app will be part native. Yes, you can get the raw song data. You can get it in a variety of different file types. You can do whatever you want to it. You want to somehow send it across to a server, and then load it back into your app on the html5 web interface? Sounds crazy but you might be able to do that. You also might have legal issues and get denied from the app store.

How can I have an .mp3 file on my site open in an app that plays MP3's?

I publish MP3s on my site. Since my audience prefers to listen to those MP3s on their iPhones, they tend to 1) download my files, 2) open up iTunes, 3) find the app folder, and 4) drag my MP3 to the audio app of their choice.
It's a tough process.
But they don't want to listen to my MP3s is their iPhone's browser and I can't get all my MP3s into a podcast.
So, I was wondering if there's a URL scheme that would let my readers, click a link on my site and have it automatically open the corresponding MP3 in a program like Apple's Podcast or Downcast or even send it to Dropbox.
This question sounds interesting, the answer is you must known the third app's scheme which contains url parameter, also the the third app must support playing mp3 file online and is already launched in the user's iPhone.
Yep!
There's the "music://" URL schema that opens iPod/Music app. I just don't know if it's valid to content from web, but you can try it out.
Check more information here:
http://wiki.akosma.com/IPhone_URL_Schemes#Music_.2F_iPod

Detect video is going to be played in UIWebView

I want something similar to this:
https://itunes.apple.com/us/app/video-download-ibolt-downloader/id481606548?mt=8
I want to detect there is any video in web page and want to download that stream into iphone device.
In console media players tells that it is setting the movie path to some URL. There must be a way to download stream and save in local device.
P.S: I know how to download a video file. I want it using online streaming or from sites which does not provide a download link.
P.S++: Video download from HTML + UIWebView is not helpful.
Thanks.
The post is old but it might be worth to clear this
Those apps are probably using undocumented API. Apple doesn't accept private API when apps are submitted to the app store, however they might not be looking for usage of undocumented notifications
You can find more information in here and here
Those apps show you the download button after you click video, and after the video starts. So probably they are listening for media playback notifications and get the url from MPMoviePlayer instance.
By the way, apple doesn't allow apps that download videos from youtube. There might be some apps on the app store that does that, but I recently got rejected because of this. It might not be worth the hassle, as most big video streaming websites don't want people downloading their videos and work hard to make sure that they don't.

How do i stream an audio file from the server to iphone?

I need to stream an audio file which is saved on my server. Is it possible for me to stream that file in order to play it on my iPhone? Or is there any other way to play an audio file from the server to iPhone? help me please.
Thanks,
Shibin
This link was useful to me : http://cocoawithlove.com/2008/09/streaming-and-playing-live-mp3-stream.html
He's got a project linked from that page http://projectswithlove.com/projects/iPhoneStreamingPlayer.zip
In this project, interesting lines are in iPhoneStreamingPlayerViewController.m, lines 82-89 start streaming the audio from a url.
I've manged to get this running on my iPhone and tested it using an mp3 on another server and it works fine. However, I've not picked through the code so I can't help you anymore than this, sorry!
Sam
NS To get the project to compile I had to change the SDK to 3.0 - if you right click on the project name and choose Get Info, then change the option called Base SDK to iPhone Device 3.0 and it should work.
There's a couple of ways to get the file playing on the iPhone, but the first problem is that you need to decide how to serve the file from your server.
One great way is to share the file out via HTTP using a Web Server. If the server is Windows, look into 'IIS'. If it's a Mac or Linux, Apache is your friend.
Once you've got the serving going, here are the options on the iPhone:
1) Use iPhone Safari to navigate to http://your-server/your-folder/the-file.ext. If the serving is correct, it'll open the mediaplayer and stream it.
2) Write an iPhone application that uses the AVMediaPlayer framework to play the file. Non-trivial, but there are plenty of samples.