【问题标题】:how to stream, save and play an mp3 file in iOS如何在 iOS 中流式传输、保存和播放 mp3 文件
【发布时间】:2013-09-23 08:56:20
【问题描述】:

我有一个包含 mp3 的 URL 列表,我想流式传输并保存它们,而且我想以给定的顺序播放它们。

【问题讨论】:

    标签: ios streaming avplayer


    【解决方案1】:

    AVPlayerItem *item=[AVPlayerItem playerItemWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"YOUR URL"]]];

    AVPlayer *audioPlayer = [AVPlayer playerWithPlayerItem:songItem];

    重要提示:您必须仅在接口(.h 文件)中声明 AVPlayer *audioPlayer,然后您可以使用 like audioPlayer = [AVPlayer playerWithPlayerItem:songItem]; [音频播放器播放];

    编码愉快...

    【讨论】:

    • 该项目是否保持持久性?
    猜你喜欢
    • 2021-09-17
    • 2021-12-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多