How to play a music file using URL link in iPhone?

后端 未结 5 735
无人共我
无人共我 2020-12-13 05:12

I want to play a music file using URL Link in the iPhone. But when I use the below code I am getting error I am not getting where I am going wrong. Can anyone Correct me?

5条回答
  •  萌比男神i
    2020-12-13 05:43

    I guess you are sending

    audioPlayer.numberOfLoops = -1;
    

    to receive NSInvalidArgumentException change it to

    audioPlayer.numberOfLoops = 1;
    

    and check apple's documentation here

提交回复
热议问题