Skip to content

This repository contains a simple project with a number of iOS examples that can be used for testing and reference.

Notifications You must be signed in to change notification settings

DreamTeamMobile/streaming-ios

 
 

Repository files navigation

Red5 Pro iOS Streaming Testbed

This repository contains a simple project with a number of examples that can be used for testing and reference.

Requirements

Red5 Pro Server

You will need a functional, running Red5 Pro server web- (or locally-) accessible for the client to connect to. If you already have a Red5 Pro Account, you can find the Red5 Pro Server download at https://account.red5pro.com/download.

For more information visit Red5Pro.com.

Red5 Pro SDK License Key

A Red5 Pro SDK License Key is required to use the iOS Mobile SDK. If you already have a Red5 Pro Account, you can find your Red5 Pro SDK License Key at https://account.red5pro.com/overview.

You will need to copy the SDK License into the license_key property field of the tests.plist.

Setup

You will need to modify /Red5ProTestbed/tests.plist (the domain value) to point to your host server instance's IP address and update the license_key property to that of your Red5 Pro SDK License. If you do not, the examples will not function when you build. If you are running the server locally, then your machine and mobile device need to be on the same WiFi network.

Once you have modified your settings, you can run the application for simulator or device.

Note: Publishing does not currently work on simulator!

Examples

1080p
A high quality publisher. Note that this is the publish test with a non-default 'bitrate' and camera size values set in tests.plist
-
ABR
A high bitrate publisher with AdaptiveBitrateController
-
Aspect Ratio
A publish example that includes modifying the scale mode of the preview display
-
Authentication
An example of publishing a stream as an authenticated user
-
Background
An example that continues to publish audio while the app is in the background
-
Bandwidth Detection - Upload
An example that tests the upload speed between the device and server before publishing.
-
Camera Swap
Touch the screen to swap which camera is being used! Verify with flash, android, or other iOS device running subscribe test that camera is swapping properly and no rendering problems occur.
-
Custom Audio Source
Uses a custom controller to modify audio data for the publisher.
-
Custom Video Source
Uses a custom controller to supply video data to the publisher.
-
Device Orientation
Rotate the device to update the orientation of the broadcast stream. Verify with browser-based players (WebRTC, Flash, HLS), Android, or other iOS device running subscribe test that image is rotating properly and no rendering problems occur.
-
Image Capture
Touch the publish stream to take a screen shot that is displayed!
-
High Quality Audio
R5Microphone.sampleRate is set to 44100 (the default is 16000).
-
Local Record
A publish example that records stream data locally on the device.
-
Mute/Unmute
Touch the screen to toggle between sending Audio & Video, sending just Video, sending just Audio, and sending no Audio or Video. Turning off and on the media sources is considered mute and unmute events, respecitively
-
Record
A publish example that records stream data on the server.
-
Remote Call
The publish portion of the remote call example - sends the remote call.
-
Stream Manager
A publish example that connects with a server cluster using a Stream Manger
-
Two Way
An example of simultaneously publishing while subscribing - allowing a conversation. Includes stream detection and auto-connection.
-
Two Way - Stream Manager
The two way example, modified to work with a stream manager. Includes stream detection and auto-connection.
-
Shared Object
An example of sending data and messages between clients through remote shared objects.
-
Send/Recieve
An example of sending data and messages from a Broadcaster to N-Subscribers.
Aspect Ratio
Change the fill mode of the stream. scale to fill, scale to fit, scale fill. Aspect ratio should be maintained on first 2.
-
Audio Delay
Captures the raw audio from the stream and delays it with a custom buffer implementation
-
Authentication
An example of subscribing to a stream as an authenticated user
-
Background
A subscribing example that can continue when the app moves into the background
-
Bandwidth Test
Detect Insufficient and Sufficient BW flags. Test on a poor network using a publisher that has high video quality. Video should become sporadic or stop altogether. The screen will darken when no video is being received.
-
Bandwidth Detection - Download
An example that tests the download speed between the device and server before subscribing.
-
Bandwidth Detection - Dual
An example that tests both the upload and download speeds between the device and server before subscribing.
-
Cluster
An example of connecting to a cluster server.
-
Image Capture
Touch the subscribe stream to take a screen shot that is displayed!
-
No View
A proof of using an audio only stream without attaching it to a view.
-
Reconnect
An example of reconnecting to a stream on a connection error.
-
Remote Call
The subscribe portion of the remote call example - receives the remote call.
-
Stream Manager
A subscribe example that connects with a server cluster using a Stream Manger
-
Two Streams
An example of subscribing to multiple streams at once, useful for subscribing to a presentation hosted by two people using a Two Way connection.

Notes

  1. For some of the above examples you will need two devices (a publisher, and a subscriber). You can also use a web browser to subscribe or publish via Flash, http://your_red5_pro_server_ip:5080/live.
  2. You can see a list of active streams by navigating to http://your_red5_pro_server_ip:5080/live/subscribe.jsp (will need to refresh this page after you have started publishing).
  3. Click on the flash link to view the published stream in your browser.

Analytics

About

This repository contains a simple project with a number of iOS examples that can be used for testing and reference.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 51.6%
  • Objective-C 38.4%
  • C 10.0%