You can configure an iOS app created with Wowza GoCoder™ SDK to broadcast a live stream from a Wowza Streaming Engine™ media server software instance. First create a live application in Wowza Streaming Engine, then use the application's connection settings in a WOWZStreamConfig object created in the SDK.
Before you begin
Before adding the functionality below to an app, make sure you've set up the Wowza GoCoder SDK for your project:
- Request a free license and download the latest version of the SDK.
- Configure your Xcode project to use the SDK.
See Download and install GoCoder SDK for iOS for detailed instructions.
Create a live application in Wowza Streaming Engine
- Configure a live application in Wowza Streaming Engine that uses an RTMP stream from your GoCoder SDK app as a video source. For instructions, see Set up live streaming using an RTMP-based encoder in Wowza Streaming Engine.
Configure the stream in GoCoder SDK for iOS
- Use the information from your Wowza Streaming Engine instance and application in a WOWZStreamConfig object.
|applicationName||The name of the live streaming application in Wowza Streaming Engine, for example, live.|
|hostAddress||The IP address for your Wowza Streaming Engine instance. Use the Host - Server specified in the Application Connection Settings panel on the Home page of Wowza Streaming Engine Manager.|
|password||The password for source authentication, if any. Use the Source Password specified on the Source Authentication page of Wowza Streaming Engine Manager.|
|portNumber||The port number for the server connection. Use the Host - Port specified in the Application Connection Settings panel on the Home page of Wowza Streaming Engine Manager (1935 by default).|
|streamName||The name of the stream, for example myStream.|
|username||The user name for source authentication, if any. Use the Source Username specified on the Source Authentication page of Wowza Streaming Engine Manager.|
Note: Your mobile device must be able to reach your Wowza Streaming Engine server. To see if it can, enter the following URL in your mobile device's browser: http://[hostAddress]:[portNumber]/crossdomain.xml.
Connect a WOWZStreamConfig object to Wowza Streaming Engine.
goCoderBroadcastConfig.hostAddress = @"192.168.1.120"; goCoderBroadcastConfig.portNumber = 1935; goCoderBroadcastConfig.applicationName = @"live"; goCoderBroadcastConfig.streamName = @"myStream"; goCoderBroadcastConfig.username= @"[username]"; goCoderBroadcastConfig.password = @"[password]";