Our sample app uses a couple open source projects and Xcode configurations in order to get live streaming up and running quickly. To make this easy, we recommend using the CocoaPods dependency manager for iOS. Once you have cloned this repo and installed CocoaPods, you are a couple steps away from streaming.
Sample Project Setup
After cloning this project and installing CocoaPods, run the following command from the project directory to get setup:
make setup && make pods
Then just open the workspace and click play to build and run.
MuxLive.swiftis a component that provides the basic network streaming capabilities and properties for configuration.
MuxLive.swift's configuration properties.
MuxBroadcastViewController.swiftprovides a simple camera user interface and wraps
MuxLive.swift, providing examples on how to use
MuxLive.swiftdirectly (if that is preferred).
If you'd like to integrate these components into your app directly (instead of using them as a reference), you can follow along with the code from the sample project's 'ViewController.swift' and install all the source files in the following ways:
# CocoaPods (not current supported! maybe? we have to figure that out.) pod "MuxLive", "~> 0.0.1" # Carthage github "muxinc/example-ios-live-streaming" ~> 0.0.1 # Swift PM let package = Package( dependencies: [ .Package(url: "https://github.com/muxinc/example-ios-live-streaming", majorVersion: 0) ] )
Alternatively, you can just copy all the source files into your Xcode project.
- Mux Live Streaming Documentation
- Swift Evolution
- NextLevel Media Capture Library
- Streambox Web-based HLS video player
- ijkplayer Streaming video player for RTMP
- LFLiveKit RTMP Streaming SDK
MuxLive are available under the MIT license, see the LICENSE file for more information.