Pregunta

I'm using Matt Gallagher's AudioStreamer to perform audio streaming in app, the URLis coming from server, right now its of type .m3u8 format, and the problem is ON, before it was of .mp3type and streamed normally. It showing an error "No audio data found". However I tried to play URL in Safari browser in simulator and its playing good so there's no problem with the URL.

I've been searching long in google but it was ended with these two SO questions. Question-1, Question-2, but none of having the answer of it yes one has solution to play it using MPMoviePlayerController but I want to stream the same with the same I've.

So I dig into code of AudioStreamer .h and .m files, where I get to know that the logic of file type selection is at #line no. 555

 + (AudioFileTypeID)hintForFileExtension:(NSString *)fileExtension { .... }

an AudioFileTypeID need to return there, the list is defined in AudioFile.h of AudioToolbox.framework doesn't contains .m3u8 file type so I can't return it here (I tried for patching with different types there).

I tried to find any alternative types (which can be use instead of this) but no results I get. Then I gone through Apple Doc, and Issues Discussion but none of helped me!

P.S. I've checked AudioToolbox.framework in iOS6.0. to check for the availability of file type but it doesn't exist at all.

Any solution?

¿Fue útil?

Solución

You can try with mpmovieviewcontroller. I am also using it for playing streaming audio in one of my Apps. For streaming type content (Like audio/video from web services or from internet) then it is perfect player. And it also look like iPhone default player. Search some tutorial on it & implement it. It is easily be implemented also.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top