Finding video content in iPhone playlist

921 views Asked by At

Running iOS 4.2.1 I'm able to create a mixed playlist containing both audio and video. 3 items, first a video then 2 audio tracks. I know I'm working with the correct playlist.

However, cycling through the items like this...

for (MPMediaItem *mediaItem in [playlist items]) {
   NSLog(@"%@",mediaItem);
   NSLog(@"path %@",[mediaItem valueForProperty:MPMediaItemPropertyAssetURL]);
}
        

...returns me output of...

<MPConcreteMediaItem: 0x1303d0> 9016712715169871401
path ipod-library://item/item.mp3?id=9016712715169871401

<MPConcreteMediaItem: 0x12e9e0> 9016712715169871401
path ipod-library://item/item.mp3?id=9016712715169871401

...so my video asset is being excluded from the playlist. The iPhone plays the playlist correctly when I'm using it as an iPod.

I've gotten as far as I have using Ole Begemann's sample code from here. Does anyone know if video assets are supposed to be excluded? Is there another approach which would combine audio and video assets, assuming they're mixed in a playlist which I know the name of?

0

There are 0 answers