Wowza Community

Streaming Wowza MP3 in objective C for iPhone

Hello,

I’m new to iPhone development and i want to stream mp3 file located on my wowza media server.

The server is correctly set up because i can play the mp3 within safari using an url like http://myIP/wowza_app/mp3:song/playlist.m3u8

I can correctly play the file with the same address in objective c if i use the AVPlayer class…

NSString *mp3URLString = @"http://myIP:1935/wowza_app/mp3:test/playlist.m3u8";
NSURL *mp3URL = [NSURL URLWithString:mp3URLString];
AVPlayer *player = [[AVPlayer alloc] initWithURL:mp3URL];
[player play];

But this class is very limited (for example : impossible to control volume)

So, how to do that in objective c ? I have found an example with CoreAudio, but it doesn’t work with Wowza.

Is there anywhere a sample work that work with wowza ?

Does it work in HTML5 video tag in IPhone?

<html>
<head> 
  <title>Cupertino Streaming</title>
</head>

<body>
<video controls src="http://[wowza-address]:1935/[app-name]/mp3:test/playlist.m3u8">
</video>

</body>
</html>

This will give you a volume control.

Richard

Make this an HTML page on your web server, and load it in IPhone. I tested the above, the mp3 works, there is a volume control and seek control.

Richard

I think I have that feature turned off, so I didn’t get a PM. If you want to write off forum, send email to support@wowza.com, attention to me. Include a link to this thread.

Richard

Done.

I edited the app name too.

I don’t have experience with objective c and iOS apps. My experience with IPhone is around HTML5 pages and some light javascript using video tag attibutes.

Richard

How to use this tag and control media in an iPhone app ?

I send you a private message. This is very important.

OK. Please just edit your previous post and change my server wowza url to something anonymous like : “http://myIP:1935/wowza_app/mp3:test/playlist.m3u8

Thanks (could you edit the name of the wowza application too - after ip/port) ? :slight_smile:

About your tip : i cannot use HTML5 tag because i need to build a music player into an iphone application. Is there a way to do that ?

I want to do the same thing related in this post :

But it seems that there is not solutions… Any idea ?