[英]iPhone : Can't streaming m3u8 url with AudioStreamer
I'm using Matt Gallagher's AudioStreamer to perform audio streaming in app, the URL
is coming from server, right now its of type .m3u8
format, and the problem is ON, before it was of .mp3
type and streamed normally. 我正在使用Matt Gallagher的 AudioStreamer在app中执行音频流,
URL
来自服务器,现在它的类型为.m3u8
格式,问题是ON,在它是.mp3
类型和正常流式传输之前。 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
. 但是我试图在Safari浏览器中在模拟器中播放
URL
并且它的播放效果很好所以URL
没有问题。
I've been searching long in google but it was ended with these two SO questions. 我一直在谷歌搜索,但它结束了这两个SO问题。 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. 问题1 , 问题2 ,但没有得到它的答案是一个解决方案使用
MPMoviePlayerController
播放它,但我想用同样的流我相同的流。
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. 所以我深入研究了AudioStreamer .h和.m文件的代码,在那里我了解到文件类型选择的逻辑是#line no。 555
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). 一个
AudioFileTypeID
需要返回那里,该列表是在AudioToolbox.framework
AudioFile.h
中定义的AudioToolbox.framework
不包含.m3u8
文件类型所以我不能在这里返回它(我尝试用不同的类型修补)。
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!
然后我浏览了Apple Doc和问题讨论但没有帮助我!
PS I've checked AudioToolbox.framework
in iOS6.0.
PS我检查
AudioToolbox.framework
在iOS6.0.
to check for the availability of file type but it doesn't exist at all. 检查文件类型的可用性,但根本不存在。
Any solution? 有解决方案吗
You can try with mpmovieviewcontroller. 您可以尝试使用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.
它看起来也像iPhone默认播放器。 Search some tutorial on it & implement it.
搜索一些教程并实现它。 It is easily be implemented also.
它也很容易实现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.