开发者

Stream video with MPMoviePlayer while streaming separate audio file in background, all from remote URL

开发者 https://www.devze.com 2022-12-24 12:05 出处:网络
So we want to be able to stream a video from a website. We also want to be able to do the same with a separate audio file.

So we want to be able to stream a video from a website.

We also want to be able to do the same with a separate audio file.

The reason why we need 开发者_JAVA技巧them to stream separately and can't integrate the two into just a video is because we need the user to be able to scrub the video however the audio should keep playing. Is there a way to get MPMoviePlayerController to stream the video on button click, as well as stream audio "underneath" the video, playing at the same time, using maybe something such as AVAudioPlayer (unless there's other classes that make this easier).

Anyone know how to do something like this?


As I know, AVAudioPlayer can't play streaming audio.

You should try Matt Gallapher's code sample --> https://github.com/mattgallagher/AudioStreamer. This class is capable of playing a mp3 over network while another video/audio stream is being playing via MPMoviePlayer.

0

精彩评论

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