Installation Information

Technical Requirements

  • iOS SDK 8.01 or later
  • Xcode 7 or later
  • Android SDK 4.4.2 or later
  • Android Studio 1.2.0 or later

Note that running and debugging apps that use the GoCoder SDK using a device emulator is not recommended due to the wide variance in functionality between the software-based audio and video codecs used by the emulator and the hardware-based codecs installed on most devices.


Installing the SDK

The SDK is distributed as a zip file with the following contents:

WowzaGoCoderSDK.framework The dynamic framework version of the GoCoder SDK library. This is the preferred method of usage, especially for Swift-based applications.
wowzagocoder_static_lib This folder contains a static library version of the GoCoder SDK library.
docs The SDK API reference documentation in HTML format. Open index.html in this folder to view the documentation.
sample-apps A set of Xcode application projects that demonstrates many of the SDK's capabilities.

Option 1: Adding WowzaGoCoderSDK.framework to your project (recommended approach)

  1. Copy WowzaGoCoderSDK.framework from the SDK distribution folder to somewhere in your project folder.

  2. Drag WowzaGoCoderSDK.framework that you just copied into your Xcode project's Project Navigator.

  3. In the dialog that will appear, be sure to select Copy items if needed.

  4. Select your project in the Project Navigator, and select General in the Project Editor

  5. In the Embedded Binaries section, click the + button and in the dialog that appears, select WowzaGoCoderSDK.framework and click the Add button

  6. Select your target in the Project Navigator, and select Build Phases in the Project Editor.

  7. From the Editor menu, select Add Build Phase > Add Run Script Build Phase (or click the + button in the upper left corner of the Build Phases editor window)

  8. The WowzaGoCoderSDK.framework contains both ARM and x86 code; this allows you to use it on a device or in the simulator. The script referenced below will strip the inactive code from the binary, which is a necessary step if you intend to submit your app to the App Store.

  9. Expand the disclosure triangle next to the new Run Script phase that was just added. In the script editor box, paste in the following:

     "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/WowzaGoCoderSDK.framework/strip-frameworks.sh"

  10. Add the SDK umbrella header to whichever source files you will be referencing the various SDK classes in:

    Objective-C:

     #import <WowzaGoCoderSDK/WowzaGoCoderSDK.h>

    Swift:

     import WowzaGoCoderSDK


Option 2: Adding libWowzaGoCoder.a to your project

  1. Copy the wowzagocoder_static_lib folder from the SDK distribution folder to somewhere in your project folder

  2. Drag the file libWowzaGoCoder.a (from the wowzagocoder\_static\_lib folder that you just copied) into your Xcode project's Project Navigator

  3. In the dialog that will appear, be sure to select Copy items if needed

  4. You will probably need to add the static library header file path to your project settings; to do this:

    • Select your project in the Project Navigator, and select Build Settings in the Project Editor

    • Find the Header Search Paths setting, and add the path to wowzagocoder_static_lib/headers. For example, if you added the wowzagocoder_static_lib/headers folder at the same level as your project file, you would enter ./wowzagocoder_static_lib/headers to your header search paths

  5. Add the SDK umbrella header to whichever source files you will be referencing the various SDK classes in:

    Objective-C:

     #import "WowzaGoCoder.h"

Define application permissions (iOS 10 and above)

For iOS 10 and above you must define your application permissions using the steps below.

  1. Select your build target in the project inspector, and select the Info tab.

  2. Add a string-valued key with the name "Privacy - Camera Usage Description" to Custom iOS Target Properties and set it's value to a description of the reason your app needs to use the camera (e.g. "The camera will be used to capture live video for streaming").

  3. Add a string-valued key with the name "Privacy - Microphone Usage Description" to Custom iOS Target Properties and set it's value to a description of the reason your app needs to use the microphone (e.g. "The microphone will be used to capture live audio for streaming").

The SDK is distributed as a zip file with the following contents:

com.wowza.gocoder.sdk.aar The Android archive file containing the GoCoder SDK library.
docs The SDK API reference documentation in HTML format. Open index.html in this folder to view the documentation.
sample-app A sample application that can be imported directly into Android Studio that demonstrates many of the SDK's capabilities.

Follow these steps to import the SDK library into your Android Studio projects:

1. Copy com.wowza.gocoder.sdk.aar into the folder named libs found directly beneath the folder for the project's primary application module. In a typical project structure, the primary application module is named app and the libs folder resides at project_root/app/libs.

2. Add a dependency for the SDK library in the app module's build.gradle (e.g. project_root/app/build.gradle) like so:

// This enables Gradle to locate Android library dependencies in the
// same manner as jar-based dependencies
repositories {
    flatDir {
        dirs 'libs'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])

    // The GoCoder SDK library dependency declaration
    compile 'com.wowza.gocoder.sdk.android:com.wowza.gocoder.sdk:1.0@aar'

    // List additional dependencies here...

}

3. Add the following permissions to the app's AndroidManifest.xml:

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

At this point you can begin using the SDK in your application. Please review the information in the Step by Step Tutorial and the Developer Guides for additional information.


Using the SDK Sample Apps

To build and run the sample applications included with the SDK, select any of the Xcode project files included in the SDK sample-apps folder.

WowzaGoCoderSDKSampleApp.xcodeproj This is an Objective-C application that demonstrates how to use the SDK to capture and broadcast video using the device's internal cameras. The Settings screen in the app allows you to modify various video, audio, capture and broadcast settings.
WowzaGoCoderSDKSampleApp.swift.xcodeproj This is a Swift application that demonstrates how to use the SDK. It shares the exact same functionality as the Objective-C counterpart described above.
WowzaGoCoderMP4PlayerSample.swift.xcodeproj This is a Swift application that demonstrates how to broadcast the frames from a local MP4 file using the WZBroadcast and WZBroadcastComponent (and related) classes/protocols, which provide lower-level access to the various components involved in a Wowza broadcast.
WowzaGoCoder.SceneKitReel.xcodeproj This is Apple's SceneKitReel sample application, modified to support broadcasting the SceneKit app's frame buffer to Wowza servers. Most of the code in this app is Apple's; look for "#pragma mark - WowzaGoCoder" to see the WowzaGoCoder related code. This example makes use of the WZBroadcast and WZBroadcastComponent (and related) classes/protocols, which provide lower-level access to the various components involved in a Wowza broadcast.

In all sample apps, the relevant GoCoder-related sources are the first files (.h and .m) or file (.swift) listed in the Project Navigator.

To facilitate working with the various sample apps, an Xcode workspace named AllSampleApps.xcworkspace is included. This workspace includes the projects listed above.

To build and run the sample application included with the SDK, select the sample-app folder after choosing to open an existing project in Android Studio. You will then be able to build, deploy, and run the sample app in debug mode as you would any other Android Studio project during development. The sample app includes activities that demonstrate the following capabilities:

CameraActivity.java Demonstrates how to use the SDK to capture and broadcast video using the device's internal cameras. The Settings screen in the app allows you to modify various video, audio, capture and broadcast settings.
InfoActivity.java Demonstrates use of the version and device interrogation APIs to list detailed information about the SDK and mobile device.
ScreenshotActivity.java Demonstrates use of the WZRenderAPI.VideoFrameListener API to capture a frame from the camera preview display and save it as a bitmap.
MP4BroadcastActivity.java Demonstrates how to broadcast the an MP4 file stored on the local device using theWZMP4Broadcaster API class.
MP4CaptureActivity.java Demonstrates how to save the video stream to an MP4 file stored on the local device using theWZMP4Writer API class.
BitmapOverlayActivity.java Demonstrates use of the WZBitmap API to overlay a bitmap on the video stream.
TextOverlayActivity.java Demonstrates use of the WZText and WZTextManager APIs to overlay text on the video stream.
FaceActivity.java Demonstrates use of the SDK in conjunction with a device's face detection capabilities to superimpose an image on the viewer's face.
AudioMeterActivity.java Demonstrates use of the WZAudioDevice.AudioSampleListener API to display an audio level meter.
BluetoothActivity.java Demonstrates how to capture and stream audio from a Bluetooth device.

Where To Go Next

Step by Step Tutorial A step by step introduction to the GoCoder SDK
Developer Guides In depth information for common GoCoder SDK-related tasks and topics
API Reference Detailed GoCoder SDK API reference docs for each platform
FAQ Common GoCoder SDK-related questions
Release Notes Information related to each of the GoCoder SDK releases