Not able to access iPod library path - iphone

I am using Media Player Framework and its MPMusicPlayer controller for integration with iPhone's default player. I got the asset URL as :-
ipod-library://item/item.mp3?id=4157200259458444598
Now I need to access this URL for copying this song to my application's 'song.mp3' file. Can anyone please help me to access the iPod URL so that I can use it in my iPhone app as the way I want.
Any quick help is really appreciated.

Apple do not allow you to copy the contents of the iPod library out to your user area. This is to prevent copyright infringement. If you want to just play the song then you'll need to post a more detailed question.

Related

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 to manually add auido files in photo gallery in iphone

I am new to iphone programming. Can any body tell me that how to manually add audio files inside the photo gallery? I got some link like we can manually add video inside the simulator but that is only video. I want audio files,too. I have searched in google but I didnt find any where how to add audios files inside photo gallery.
Please can any body tell me.
Thanks
The iPhone's photo gallery does not support audio files.
You can not add audio files to Photo Library. But you can use iPod Library Access Programming Guide for same approach.
Also refer AddMusic demo. AddMusic demonstrates basic use of iPod library access, part of the Media Player framework. You use iPod library access to play songs, audio books, and audio podcasts that are synced from a user's desktop iTunes library. This sample uses the Media Player framework's built-in user interface for choosing music.
AddMusic also demonstrates how to mix application audio with iPod library audio

Accessing music library and playlists on iPhone

On iPhone, I'd like to be able to allow the user to select a song from their iTunes library.
Also, I was wondering how an app can access the specific playlist that song resides in (and how my app can access other songs in that playlist).
Since you've asked a fairly open question, all I can suggest is have a look at the iPod Library Access Programming Guide to get started and then come back with a more detailed question after you've tried some thing.

iOS video player metadata

My question is if there is any built-in interpretation of metadata by the video player in iOS. I know one can add meta-data to a video and interpret it within a custom application as shown here.
In iOS on ipod or iphone, an HTML video is opened within the native player. I would like to display a message above or below the video for a short duration at the beginning. Since I cannot control the native player I thought there might be some built in metadata interpretation that could be used to perform this. I have not been able to find any information on this.
Any help is appreciated.
The blog you've posted includes details on using the native player MPMoviePlayerController to display meta data, which is pretty cool actually. You learn something new every day! If you're making a Phonegap App I suppose you could write a plugin to do this?
Or alternatively, have a look at this other OS question which appears to suggest that it is possible - though not seemingly with metadata embedded in the actual video. Apparently this works on iOS.
Reading metadata from the <track> of an HTML5 <video> using Captionator

Access iPhone User Songs and Videos?

I was wondering if I can access user's songs and videos in iPhone, part of that access if I can save them or modify them? hopefully not a Jailbroken iPhones
I am greatly appreciated.
Yes, you can. I can't speak for video, because I've only done it for audio, but you can definitely get audio data. These links should get you started. Note: I am as yet unsure if this works with tracks that use any kind of iTunes-related DRM.
First of all, this blog post talks you through the method of accessing the data. Note the reliance on iOS 4.1 or above.
This SO question/answer explains how to get at the raw pcm data, should you want to do more than just save it out.
You can allow the user to pick songs using the MPMediaPickerController class. I think you can save the selected item to your app's sandbox directory.
You can read up on this a bit more with this SO question.