How to get file size and current file size from NSURL for AVPlayer iOS4.0

前端 未结 3 1731
迷失自我
迷失自我 2020-12-20 08:13
self.player = [[AVPlayer playerWithURL:[NSURL URLWithString:@\"http://myurl.com/track.mp3\"]] retain];

I am trying make a UIProgressView for the ab

3条回答
  •  暖寄归人
    2020-12-20 08:59

    I think you do not want to know anything about file-sizes, but you're more interested in times.

    Try self.player.currentItem.asset.duration for duration of currently playing item, self.player.currentTime for current time.

提交回复
热议问题