You can configure an iOS app created with Wowza GoCoder™ SDK to broadcast or play a live stream from the Wowza Streaming Cloud™ service. First create the live stream in Wowza Streaming Cloud, then use the live stream'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 stream in Wowza Streaming Cloud
To start, create a live stream in Wowza Streaming Cloud and locate the live stream's source connection information. With this connection information, you can configure a source stream using GoCoder SDK.
You can use either of these workflows:
Wowza Streaming Cloud web manager
- Click the Live Streams tab, and then click Add Live Stream.
- On the Live Stream Setup page, enter a Live Stream Name, choose a Broadcast Location, and then click Next.
- On the Video Source and Transcoder Settings page, select the Camera / Encoder you want to use as the source for the live stream. For example, choose Wowza GoCoder or Other RTMP.
- If you're asked to select a Source Delivery Method, select Push Stream.
- Specify other video source settings, click Next, and complete the steps to finish creating the live stream.
Note: For more information about live stream settings, see the Help panel on the right side of any Wowza Streaming Cloud page.
Wowza Streaming Cloud creates the live stream and displays the Overview tab of the live stream detail page. You'll use the Source Connection Information that appears under the Video Thumbnail to configure the stream in the SDK.
Wowza Streaming Cloud REST API
- Create a Wowza Streaming Cloud live stream with the REST API. For more information, see How to broadcast a live stream by using the Wowza Streaming Cloud REST API.
- Use the source connection information from the REST API response to configure the source stream. It should look something like this:
"source_connection_information": { "primary_server": "[subdomain].entrypoint.cloud.wowza.com", "host_port": 1935, "application": "app-5437", "stream_name": "12e4c04c", "disable_authentication": false, "username": "client2", "password": "[password_value]" },
Configure the stream in GoCoder SDK for iOS
Use the Source Connection Information in a WOWZStreamConfig object.
Property | Description |
applicationName | The name of the live streaming application.
|
hostAddress | The IP address for your Wowza Streaming Cloud instance.
|
password | The password for source authentication, if source authentication is enabled.
|
portNumber | The port number for the server connection (1935 by default).
|
streamName | The name of the live stream you're sending from the SDK.
|
username | The user name for source authentication, if source authentication is enabled.
|
Connect a WOWZStreamConfig object to the Wowza Streaming Cloud live stream.
goCoderBroadcastConfig.hostAddress = @"c45743.entrypoint.cloud.wowza.com"; goCoderBroadcastConfig.portNumber = 1935; goCoderBroadcastConfig.applicationName = @"app-5437"; goCoderBroadcastConfig.streamName = @"cf2b9ba6"; goCoderBroadcastConfig.username= @"client2"; goCoderBroadcastConfig.password = @"[password]";