streaming data from a server - iphone

I would like to have all my data on a server be streamed into my iphone app.
How does this work?
e.g. images, text and sound
Should this be read into an array and then manipulated?
As I would like the app to be update-able whenever new content is added to the server.
This obviously means building the app in such a way that it wont crash or have errors due to updates.
How is this done? Is there single folder for each which is streamed in e.g. sound clips folder.
Thanks

What i understood from your question is that you want to play sounds, videos on your iphone app over the internet.
Images:
To display image on your iphone over the internet is very easy all you have to do is publish your website somewhere then iphone will use the hyperlink of that image meaning like when you browse any image in your browser you get e.g:
http://www.google.com/images/logos/ps_logo2.png your iphone app will just call this URL to display the image.
For Sound And Videos
They both will also be published on the website and they will have URL so that your iPhone App can access them to pause & stop the sound/video you just have to stop buffering & as a precaution you can save the location of buffer & if you want to Resume just start buffering from the saved buffer location

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.

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.

Record HTTP Live Streaming Video To File While Watching?

I am trying to create a streaming video DVR like functionality in an app I am developing. I have an HTTP Live Stream that I have successfully gotten to play on the iPad. I want the user to be able to push the "Record" button, and begin recording the video that is currently playing from that point. This video file will be accessible from the app or from the camera roll. Currently, I am using the MPMoviePlayerController object to play the video stream. I do not see any methods of accessing the data from the object in Apple's documentation. Here are some thoughts I had on ways of going about this.
1) Somehow access the video data from MPMoviePlayerController, and write this to a file. Or use another type of player object that will allow me to play the video and access the currently playing data.
2) Implement some sort of screen capture recording that gets a video capture of the iPad's screen. This would allow me to record the video in a "screenshot" sort of way.
3) Locate the HTTP Live Streaming video segments where they are stored by MPMoviePlayerController. Presumably they need to be stored somewhere on the iPad for playback. Is there a way of accessing these files?
4) Manually download the stream video segments over http while streaming the file. This seems like its not ideal since the stream would have to be downloaded twice.
5) This could work. Periodically download the video segments to the iPhone. Set up a local http server on the iPhone and server the videos to the MPMoviePlayerController. This way the video segments could be marked for recording and assembled into a video.
6) I do have control of the streaming server. I could write some server side code to record the video on the server end, then send the video to the iPad after the fact. I would rather not do this.
Has anyone done any of these things? Ideally the iPhone would just be able to access the video data somehow and easily record it. I would rather not get into options 4, 5, or 6 (above) if I don't have to.
Thanks in advance.
DVR on the device is somewhat not encouraged, due to the limited space available and other factors like battery life, processing power, cleanup procedures after the user stops the dvr, etc.
If you want to achieve DVR playback on iOS devices (or other devices using HLS), I suggest you keep the video server side. The live stream is already captured and segmented server side, all you would have to do is keep the segments a bit longer, instead of deleting them. By using the EXT-X-PLAYLIST-TYPE and EXT-X-MEDIA-SEQUENCE tags, you can suggest to the player that he's opening a live stream which has DVR (earlier) video available.
Alternatively, you can use a server that does that out of the box, for example Wowza. Here's an article on how to achieve this with Wowza

How to access the mp3 stored in iPhone in iPhone SDK

How does one access an MP3 stored in iPhone iTune_controls directory? When i want to see the MP3 it is not visible for me in my applcation.
I'm not sure I understand your question correctly, but it sounds like you want to access an MP3 from your app that is in the iTunes (iPod?) area of the phone, is this correct?
If so then you can't directly access the file, since your app runs in an isolated sand-box.
If on the other hand you're wanting to play an MP3 that's part of your app then look in the iPhone Library - Audio Queue Services section.