开发者

Finding video content in iPhone playlist

开发者 https://www.devze.com 2023-02-12 15:42 出处:网络
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.

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 he开发者_如何学编程re. 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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号