├── .gitignore ├── .swift-version ├── .travis.yml ├── App ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.xcconfig ├── ConnectViewController.swift ├── Debug.xcconfig ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ └── Icon-App-iTunes.png │ ├── Contents.json │ ├── close_button.imageset │ │ ├── Contents.json │ │ ├── close.png │ │ ├── close@2x.png │ │ └── close@3x.png │ ├── mux_logo.imageset │ │ ├── Contents.json │ │ ├── logo.png │ │ ├── logo@2x.png │ │ └── logo@3x.png │ ├── textfield_active.imageset │ │ ├── Contents.json │ │ ├── textfield_active.png │ │ ├── textfield_active@2x.png │ │ └── textfield_active@3x.png │ └── textfield_inactive.imageset │ │ ├── Contents.json │ │ ├── textfield_inactive.png │ │ ├── textfield_inactive@2x.png │ │ └── textfield_inactive@3x.png ├── Info.plist ├── LaunchScreen.storyboard ├── Release.xcconfig └── ViewController.swift ├── Framework └── Info.plist ├── LICENSE ├── MuxLive.podspec ├── MuxLive.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── Debug.xcscheme │ ├── MuxLive.xcscheme │ └── Release.xcscheme ├── MuxLive.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── Podfile ├── Podfile.lock ├── README.md ├── Sources ├── MuxBroadcastViewController.swift ├── MuxLive.h ├── MuxLive.swift └── MuxLiveConfiguration.swift ├── build_docs.sh ├── docs ├── Classes.html ├── Classes │ ├── MuxBroadcastViewController.html │ ├── MuxLive.html │ ├── MuxLiveAudioConfiguration.html │ └── MuxLiveVideoConfiguration.html ├── Enums.html ├── Enums │ ├── MuxLiveError.html │ └── MuxLiveState.html ├── Global Variables.html ├── Protocols.html ├── Protocols │ ├── MuxBroadcasterDelegate.html │ └── MuxLiveDelegate.html ├── badge.svg ├── css │ ├── highlight.css │ └── jazzy.css ├── docsets │ ├── MuxLive.docset │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ ├── Documents │ │ │ ├── Classes.html │ │ │ ├── Classes │ │ │ │ ├── MuxBroadcastViewController.html │ │ │ │ ├── MuxLive.html │ │ │ │ ├── MuxLiveAudioConfiguration.html │ │ │ │ └── MuxLiveVideoConfiguration.html │ │ │ ├── Enums.html │ │ │ ├── Enums │ │ │ │ ├── MuxLiveError.html │ │ │ │ └── MuxLiveState.html │ │ │ ├── Global Variables.html │ │ │ ├── Protocols.html │ │ │ ├── Protocols │ │ │ │ ├── MuxBroadcasterDelegate.html │ │ │ │ └── MuxLiveDelegate.html │ │ │ ├── css │ │ │ │ ├── highlight.css │ │ │ │ └── jazzy.css │ │ │ ├── img │ │ │ │ ├── carat.png │ │ │ │ ├── dash.png │ │ │ │ └── gh.png │ │ │ ├── index.html │ │ │ ├── js │ │ │ │ ├── jazzy.js │ │ │ │ └── jquery.min.js │ │ │ └── search.json │ │ │ └── docSet.dsidx │ └── MuxLive.tgz ├── img │ ├── carat.png │ ├── dash.png │ └── gh.png ├── index.html ├── js │ ├── jazzy.js │ └── jquery.min.js ├── search.json └── undocumented.json └── makefile /.gitignore: -------------------------------------------------------------------------------- 1 | ## macOS 2 | .DS_Store 3 | 4 | # Xcode 5 | # 6 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 7 | 8 | ## Build generated 9 | build/ 10 | DerivedData/ 11 | 12 | ## Various settings 13 | *.pbxuser 14 | !default.pbxuser 15 | *.mode1v3 16 | !default.mode1v3 17 | *.mode2v3 18 | !default.mode2v3 19 | *.perspectivev3 20 | !default.perspectivev3 21 | xcuserdata/ 22 | *.xccheckout 23 | *.moved-aside 24 | *.xcuserstate 25 | 26 | ## Other 27 | *.moved-aside 28 | *.xccheckout 29 | *.xcscmblueprint 30 | 31 | ## Obj-C/Swift specific 32 | *.hmap 33 | *.ipa 34 | *.dSYM.zip 35 | *.dSYM 36 | 37 | ## Playgrounds 38 | timeline.xctimeline 39 | playground.xcworkspace 40 | 41 | # Swift Package Manager 42 | .build/ 43 | 44 | # CocoaPods 45 | Pods/ 46 | 47 | # Carthage 48 | Carthage/Checkouts 49 | Carthage/Build 50 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.0 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode10 3 | env: 4 | global: 5 | - LC_CTYPE=en_US.UTF-8 6 | - LANG=en_US.UTF-8 7 | - IOS_SDK=iphonesimulator12.0 8 | script: 9 | - xcodebuild -showsdks 10 | - xcodebuild -workspace MuxLive.xcworkspace -scheme 'Debug' -sdk $IOS_SDK build analyze 11 | -------------------------------------------------------------------------------- /App/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SampleApp 4 | // 5 | // Copyright (c) 2018 Mux, Inc. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in all 15 | // copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | // SOFTWARE. 24 | // 25 | 26 | import UIKit 27 | 28 | @UIApplicationMain 29 | class AppDelegate: UIResponder, UIApplicationDelegate { 30 | 31 | var window: UIWindow? 32 | 33 | // MARK: - UIApplicationDelegate 34 | 35 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 36 | self.window = UIWindow(frame:UIScreen.main.bounds) 37 | self.window?.backgroundColor = UIColor.black 38 | 39 | let viewController = ViewController() 40 | self.window?.rootViewController = viewController 41 | self.window?.makeKeyAndVisible() 42 | 43 | DispatchQueue.main.async { 44 | viewController.presentConnectModal(animated: true) 45 | } 46 | 47 | return true 48 | } 49 | 50 | func applicationWillResignActive(_ application: UIApplication) { 51 | } 52 | 53 | func applicationDidEnterBackground(_ application: UIApplication) { 54 | } 55 | 56 | func applicationWillEnterForeground(_ application: UIApplication) { 57 | } 58 | 59 | func applicationDidBecomeActive(_ application: UIApplication) { 60 | } 61 | 62 | func applicationWillTerminate(_ application: UIApplication) { 63 | } 64 | 65 | var orientationLock = UIInterfaceOrientationMask.all 66 | 67 | func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask 68 | { 69 | return orientationLock 70 | } 71 | } 72 | 73 | extension UIApplication { 74 | 75 | public class func presentViewControllerFromRoot(viewController: UIViewController, animated: Bool = true) { 76 | if let window = UIApplication.shared.delegate?.window { 77 | window?.rootViewController?.dismiss(animated: true, completion: nil) 78 | } 79 | 80 | var rootViewController = UIApplication.shared.keyWindow?.rootViewController 81 | if let navigationController = rootViewController as? UINavigationController { 82 | rootViewController = navigationController.viewControllers.first 83 | } 84 | if let tabBarController = rootViewController as? UITabBarController { 85 | rootViewController = tabBarController.selectedViewController 86 | } 87 | rootViewController?.present(viewController, animated: animated) 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /App/Base.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Base.xcconfig 3 | // 4 | // Created by Patrick Piemonte on 3/26/13. 5 | // 6 | 7 | PRODUCT_NAME = $(TARGET_NAME) 8 | INFOPLIST_FILE = $(TARGET_NAME)/$(TARGET_NAME)-Info.plist 9 | WRAPPER_EXTENSION = app 10 | 11 | ARCHS[sdk=iphoneos*] = $(ARCHS_STANDARD_INCLUDING_64_BIT) 12 | IPHONEOS_DEPLOYMENT_TARGET = 11.0 13 | 14 | SKIP_INSTALL = NO 15 | 16 | DEAD_CODE_STRIPPING = YES; 17 | 18 | OTHER_CFLAGS = -fconstant-cfstrings 19 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym 20 | 21 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0 22 | GCC_C_LANGUAGE_STANDARD = c99 23 | CLANG_CXX_LANGUAGE_STANDARD = c++11 24 | CLANG_CXX_LIBRARY = libc++ 25 | 26 | GCC_PRECOMPILE_PREFIX_HEADER = YES 27 | GCC_PREFIX_HEADER = $(TARGET_NAME)/$(TARGET_NAME)-Prefix.pch 28 | 29 | CLANG_ENABLE_OBJC_ARC = YES 30 | 31 | GCC_DYNAMIC_NO_PIC = NO 32 | GCC_INLINES_ARE_PRIVATE_EXTERN = YES 33 | GCC_SYMBOLS_PRIVATE_EXTERN = NO 34 | 35 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 36 | CLANG_WARN_EMPTY_BODY = YES 37 | CLANG_WARN_CONSTANT_CONVERSION = YES 38 | CLANG_WARN_ENUM_CONVERSION = YES 39 | CLANG_WARN_INT_CONVERSION = YES 40 | CLANG_WARN_BOOL_CONVERSION = YES 41 | 42 | GCC_ENABLE_OBJC_EXCEPTIONS = NO 43 | -------------------------------------------------------------------------------- /App/ConnectViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ConnectViewController.swift 3 | // SampleApp 4 | // 5 | // Copyright (c) 2018 Mux, Inc. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in all 15 | // copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | // SOFTWARE. 24 | // 25 | 26 | import UIKit 27 | import Hue 28 | 29 | public protocol ConnectDelegate: NSObjectProtocol { 30 | func connectViewController(_ viewController: ConnectViewController, didConnectWithStreamKey streamKey: String) 31 | } 32 | 33 | public class ConnectViewController: UIViewController { 34 | 35 | // MARK: - properties 36 | 37 | public weak var connectDelegate: ConnectDelegate? 38 | 39 | private var _logoView: UIImageView? 40 | private var _textField: UITextField? 41 | private var _startButton: MuxButton? 42 | private var _textBox: UITextView? 43 | 44 | // MARK: - object lifecycle 45 | 46 | public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { 47 | super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) 48 | } 49 | 50 | public required init?(coder aDecoder: NSCoder) { 51 | fatalError("not supported") 52 | } 53 | 54 | // MARK: - view lifecycle 55 | 56 | public override func viewDidLoad() { 57 | super.viewDidLoad() 58 | 59 | self.view.backgroundColor = UIColor.white 60 | self.view.autoresizingMask = [.flexibleWidth, .flexibleHeight] 61 | 62 | self.view.layer.cornerRadius = 12.0 63 | 64 | self._logoView = UIImageView(image: UIImage(named: "mux_logo")) 65 | if let logoView = self._logoView { 66 | logoView.center = CGPoint(x: self.view.bounds.midX, y: self.view.bounds.midY - (self.view.bounds.size.height * 0.2)) 67 | self.view.addSubview(logoView) 68 | } 69 | 70 | self._textField = UITextField(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width - (20 * 2), height: 40)) 71 | if let textField = self._textField, 72 | let logoView = self._logoView { 73 | textField.delegate = self 74 | textField.keyboardType = .URL 75 | textField.returnKeyType = .done 76 | textField.borderStyle = .none 77 | textField.autocapitalizationType = .none 78 | textField.autocorrectionType = .default 79 | textField.spellCheckingType = .no 80 | textField.clearButtonMode = .never 81 | textField.tintColor = UIColor(hex: "#fb3064") 82 | textField.textColor = UIColor.black 83 | textField.background = UIImage(named: "textfield_inactive") 84 | textField.attributedPlaceholder = NSAttributedString(string: "stream key or URL", attributes: [NSAttributedString.Key.foregroundColor : UIColor.darkGray]) 85 | textField.center = CGPoint(x: self.view.bounds.midX, y: logoView.frame.maxY + 45.0 + 20.0) 86 | self.view.addSubview(textField) 87 | 88 | } 89 | 90 | self._startButton = MuxButton(type: .custom) 91 | if let startButton = self._startButton, 92 | let textField = self._textField { 93 | startButton.frame = CGRect(x: 0, y: 0, width: self.view.bounds.size.width - (20 * 2), height: 50) 94 | startButton.setTitleColor(UIColor.white, for: .normal) 95 | startButton.setTitle("Start Broadcast", for: .normal) 96 | startButton.setTitle("Starting…", for: .disabled) 97 | startButton.layer.cornerRadius = startButton.frame.height * 0.5 98 | startButton.backgroundColor = UIColor(hex: "#fb2490") 99 | startButton.addTarget(self, action: #selector(handleStartButton(_:)), for: .touchUpInside) 100 | startButton.center = CGPoint(x: self.view.bounds.midX, y: textField.frame.maxY + 25.0 + 20.0) 101 | self.view.addSubview(startButton) 102 | } 103 | 104 | self._textBox = UITextView(frame: CGRect(x: 20, y: self.view.bounds.size.height - 60, width: self.view.bounds.size.width - 40, height: 100)) 105 | if let textBox = self._textBox { 106 | textBox.text = "Note: streaming from a simulator will not work because the simulator does not have access to a camera." 107 | self.view.addSubview(textBox) 108 | } 109 | } 110 | 111 | public override func viewWillDisappear(_ animated: Bool) { 112 | super.viewWillDisappear(animated) 113 | _textField?.resignFirstResponder() 114 | } 115 | } 116 | 117 | // MARK: - internal 118 | 119 | extension ConnectViewController { 120 | 121 | internal func startStream() { 122 | if let text = self._textField?.text, 123 | text.count > 0 { 124 | self.view.isUserInteractionEnabled = false 125 | self._startButton?.isEnabled = false 126 | self.connectDelegate?.connectViewController(self, didConnectWithStreamKey: text) 127 | self.dismiss(animated: true, completion: nil) 128 | } 129 | } 130 | 131 | } 132 | 133 | // MARK: - status bar 134 | 135 | extension ConnectViewController { 136 | 137 | public override var preferredStatusBarStyle: UIStatusBarStyle { 138 | get { 139 | return .default 140 | } 141 | } 142 | 143 | } 144 | 145 | // MARK: - UIButton 146 | 147 | extension ConnectViewController { 148 | 149 | @objc public func handleStartButton(_ button: UIButton) { 150 | self.startStream() 151 | } 152 | 153 | } 154 | 155 | // MARK: - UITextFieldDelegate 156 | 157 | extension ConnectViewController: UITextFieldDelegate { 158 | 159 | public func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool { 160 | textField.background = UIImage(named: "textfield_active") 161 | return true 162 | } 163 | 164 | public func textFieldDidEndEditing(_ textField: UITextField) { 165 | textField.background = UIImage(named: "textfield_inactive") 166 | } 167 | 168 | public func textFieldShouldReturn(_ textField: UITextField) -> Bool { 169 | textField.resignFirstResponder() 170 | self.startStream() 171 | return true 172 | } 173 | 174 | } 175 | 176 | public class MuxButton: UIButton { 177 | 178 | override open var isHighlighted: Bool { 179 | didSet { 180 | backgroundColor = isHighlighted ? UIColor(hex: "#fb2490").alpha(0.7) : UIColor(hex: "#fb2490") 181 | } 182 | } 183 | 184 | } 185 | -------------------------------------------------------------------------------- /App/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Debug.xcconfig 3 | // 4 | // Created by Patrick Piemonte on 3/26/13. 5 | // 6 | 7 | #include "Base.xcconfig" 8 | 9 | GCC_OPTIMIZATION_LEVEL = 0 10 | GCC_PREPROCESSOR_DEFINITIONS = $(INHERITED) DEBUG=1 11 | 12 | GCC_TREAT_WARNINGS_AS_ERRORS = YES 13 | GCC_WARN_ABOUT_MISSING_PROTOTYPES[sdk=iphone*] = YES 14 | GCC_WARN_ABOUT_RETURN_TYPE = YES 15 | GCC_WARN_SHADOW[sdk=iphone*] = YES 16 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES 17 | GCC_WARN_UNDECLARED_SELECTOR = YES 18 | GCC_WARN_UNINITIALIZED_AUTOS = YES 19 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES 20 | GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES 21 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES 22 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES 23 | GCC_WARN_MISSING_PARENTHESES = YES 24 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES 25 | GCC_WARN_SIGN_COMPARE = YES 26 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES 27 | GCC_WARN_UNUSED_VARIABLE = YES 28 | GCC_WARN_UNUSED_FUNCTION = YES 29 | GCC_WARN_UNUSED_LABEL = YES 30 | GCC_WARN_UNUSED_VALUE = YES 31 | GCC_WARN_UNUSED_VARIABLE = YES 32 | GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES 33 | GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES 34 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES 35 | GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES 36 | 37 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES 38 | CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS[sdk=iphone*] = YES 39 | CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES 40 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES 41 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES 42 | 43 | CLANG_WARN_CXX0X_EXTENSIONS = NO 44 | 45 | CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES 46 | CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES 47 | 48 | ALWAYS_SEARCH_USER_PATHS = NO 49 | COPY_PHASE_STRIP = NO 50 | ONLY_ACTIVE_ARCH = YES 51 | 52 | OTHER_CFLAGS[sdk=iphone*] = $(OTHER_CFLAGS) -Wall -Wconversion -Wundeclared-selector -Wobjc-autosynthesis-property-ivar-name-match 53 | 54 | -------------------------------------------------------------------------------- /App/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-40x40@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-60x60@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "idiom" : "ipad", 53 | "size" : "20x20", 54 | "scale" : "1x" 55 | }, 56 | { 57 | "idiom" : "ipad", 58 | "size" : "20x20", 59 | "scale" : "2x" 60 | }, 61 | { 62 | "idiom" : "ipad", 63 | "size" : "29x29", 64 | "scale" : "1x" 65 | }, 66 | { 67 | "idiom" : "ipad", 68 | "size" : "29x29", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "idiom" : "ipad", 73 | "size" : "40x40", 74 | "scale" : "1x" 75 | }, 76 | { 77 | "idiom" : "ipad", 78 | "size" : "40x40", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "idiom" : "ipad", 83 | "size" : "76x76", 84 | "scale" : "1x" 85 | }, 86 | { 87 | "idiom" : "ipad", 88 | "size" : "76x76", 89 | "scale" : "2x" 90 | }, 91 | { 92 | "idiom" : "ipad", 93 | "size" : "83.5x83.5", 94 | "scale" : "2x" 95 | }, 96 | { 97 | "size" : "1024x1024", 98 | "idiom" : "ios-marketing", 99 | "filename" : "Icon-App-iTunes.png", 100 | "scale" : "1x" 101 | } 102 | ], 103 | "info" : { 104 | "version" : 1, 105 | "author" : "xcode" 106 | } 107 | } -------------------------------------------------------------------------------- /App/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /App/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /App/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /App/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /App/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /App/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /App/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /App/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /App/Images.xcassets/AppIcon.appiconset/Icon-App-iTunes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/AppIcon.appiconset/Icon-App-iTunes.png -------------------------------------------------------------------------------- /App/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /App/Images.xcassets/close_button.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "close.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "close@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "close@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /App/Images.xcassets/close_button.imageset/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/close_button.imageset/close.png -------------------------------------------------------------------------------- /App/Images.xcassets/close_button.imageset/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/close_button.imageset/close@2x.png -------------------------------------------------------------------------------- /App/Images.xcassets/close_button.imageset/close@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/close_button.imageset/close@3x.png -------------------------------------------------------------------------------- /App/Images.xcassets/mux_logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "logo.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "logo@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "logo@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /App/Images.xcassets/mux_logo.imageset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/mux_logo.imageset/logo.png -------------------------------------------------------------------------------- /App/Images.xcassets/mux_logo.imageset/logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/mux_logo.imageset/logo@2x.png -------------------------------------------------------------------------------- /App/Images.xcassets/mux_logo.imageset/logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/mux_logo.imageset/logo@3x.png -------------------------------------------------------------------------------- /App/Images.xcassets/textfield_active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "textfield_active.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "textfield_active@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "textfield_active@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /App/Images.xcassets/textfield_active.imageset/textfield_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/textfield_active.imageset/textfield_active.png -------------------------------------------------------------------------------- /App/Images.xcassets/textfield_active.imageset/textfield_active@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/textfield_active.imageset/textfield_active@2x.png -------------------------------------------------------------------------------- /App/Images.xcassets/textfield_active.imageset/textfield_active@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/textfield_active.imageset/textfield_active@3x.png -------------------------------------------------------------------------------- /App/Images.xcassets/textfield_inactive.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "textfield_inactive.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "textfield_inactive@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "textfield_inactive@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /App/Images.xcassets/textfield_inactive.imageset/textfield_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/textfield_inactive.imageset/textfield_inactive.png -------------------------------------------------------------------------------- /App/Images.xcassets/textfield_inactive.imageset/textfield_inactive@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/textfield_inactive.imageset/textfield_inactive@2x.png -------------------------------------------------------------------------------- /App/Images.xcassets/textfield_inactive.imageset/textfield_inactive@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/App/Images.xcassets/textfield_inactive.imageset/textfield_inactive@3x.png -------------------------------------------------------------------------------- /App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleVersion 20 | 0.0.1 21 | LSRequiresIPhoneOS 22 | 23 | NSAppTransportSecurity 24 | 25 | NSAllowsArbitraryLoads 26 | 27 | 28 | NSCameraUsageDescription 29 | Allowing access to the camera lets you view and record. 30 | NSMicrophoneUsageDescription 31 | Allowing access to the microphone lets you hear and record sounds. 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UIRequiredDeviceCapabilities 35 | 36 | armv7 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | UIInterfaceOrientationPortraitUpsideDown 42 | UIInterfaceOrientationLandscapeLeft 43 | UIInterfaceOrientationLandscapeRight 44 | 45 | UISupportedInterfaceOrientations~ipad 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationPortraitUpsideDown 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /App/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /App/Release.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Release.xcconfig 3 | // 4 | // Created by Patrick Piemonte on 3/26/13. 5 | // 6 | 7 | #include "Base.xcconfig" 8 | 9 | GCC_OPTIMIZATION_LEVEL = s 10 | GCC_PREPROCESSOR_DEFINITIONS = _LIBCPP_VISIBLE= NDEBUG=1 NS_BLOCK_ASSERTIONS=1 11 | 12 | DEAD_CODE_STRIPPING = YES 13 | COPY_PHASE_STRIP = YES 14 | 15 | OTHER_CFLAGS[sdk=iphone*] = $(OTHER_CFLAGS) -DNS_BLOCK_ASSERTIONS=1 16 | 17 | VALIDATE_PRODUCT = YES 18 | -------------------------------------------------------------------------------- /App/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SampleApp 4 | // 5 | // Copyright (c) 2018 Mux, Inc. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in all 15 | // copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | // SOFTWARE. 24 | // 25 | 26 | import UIKit 27 | import RPCircularProgress 28 | import Hue 29 | //import MuxLive 30 | 31 | public class ViewController: UIViewController { 32 | 33 | // MARK: - properties 34 | 35 | private var _broadcastViewController: MuxBroadcastViewController? 36 | 37 | private var _stopButton: UIButton? 38 | private var _streamStatusProgress: RPCircularProgress? 39 | 40 | // MARK: - object lifecycle 41 | 42 | public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { 43 | super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) 44 | } 45 | 46 | public required init?(coder aDecoder: NSCoder) { 47 | fatalError("not supported") 48 | } 49 | 50 | // MARK: - view lifecycle 51 | 52 | public override func viewDidLoad() { 53 | super.viewDidLoad() 54 | 55 | self.view.backgroundColor = UIColor.black 56 | self.view.autoresizingMask = [.flexibleWidth, .flexibleHeight] 57 | 58 | // setup a broadcast view controller 59 | self._broadcastViewController = MuxBroadcastViewController() 60 | if let viewController = self._broadcastViewController { 61 | viewController.muxBroadcasterDelegate = self 62 | 63 | self.addChild(viewController) 64 | self.view.addSubview(viewController.view) 65 | viewController.didMove(toParent: self) 66 | } 67 | 68 | var safeAreaTop: CGFloat = UIApplication.shared.statusBarFrame.size.height 69 | if let window = UIApplication.shared.keyWindow { 70 | if window.safeAreaInsets.top > 0 { 71 | safeAreaTop = window.safeAreaInsets.top 72 | } 73 | } 74 | let margin: CGFloat = 15.0 75 | 76 | self._streamStatusProgress = RPCircularProgress() 77 | if let streamStatusProgress = self._streamStatusProgress { 78 | streamStatusProgress.frame = CGRect(x: 0, y: 0, width: 25, height: 25) 79 | streamStatusProgress.roundedCorners = true 80 | streamStatusProgress.thicknessRatio = 0.4 81 | streamStatusProgress.trackTintColor = UIColor(hex: "#221e1f") 82 | streamStatusProgress.progressTintColor = UIColor(hex: "#fb3064") 83 | streamStatusProgress.isUserInteractionEnabled = false 84 | streamStatusProgress.center = CGPoint(x: self.view.bounds.width - (streamStatusProgress.frame.height * 0.5) - margin, 85 | y: (streamStatusProgress.frame.width * 0.5) + margin + safeAreaTop) 86 | self.view.addSubview(streamStatusProgress) 87 | } 88 | 89 | self._stopButton = UIButton(type: .custom) 90 | if let stopButton = self._stopButton { 91 | stopButton.setImage(UIImage(named: "close_button"), for: .normal) 92 | stopButton.sizeToFit() 93 | stopButton.addTarget(self, action: #selector(handleStopButton(_:)), for: .touchUpInside) 94 | stopButton.center = CGPoint(x: (stopButton.frame.height * 0.5) + margin, 95 | y: (stopButton.frame.width * 0.5) + margin + safeAreaTop) 96 | self.view.addSubview(stopButton) 97 | } 98 | } 99 | 100 | public override func viewWillDisappear(_ animated: Bool) { 101 | super.viewWillDisappear(animated) 102 | self._streamStatusProgress?.enableIndeterminate(false, completion: nil) 103 | } 104 | 105 | } 106 | 107 | // MARK: - status bar 108 | 109 | extension ViewController { 110 | 111 | public override var preferredStatusBarStyle: UIStatusBarStyle { 112 | get { 113 | return .lightContent 114 | } 115 | } 116 | 117 | } 118 | 119 | // MARK: - internal 120 | 121 | extension ViewController { 122 | 123 | public func presentConnectModal(animated: Bool = true) { 124 | let connectViewController = ConnectViewController() 125 | connectViewController.connectDelegate = self 126 | connectViewController.modalPresentationStyle = .currentContext 127 | connectViewController.modalTransitionStyle = .coverVertical 128 | UIApplication.presentViewControllerFromRoot(viewController: connectViewController, animated: animated) 129 | } 130 | 131 | } 132 | 133 | // MARK: - UIButton 134 | 135 | extension ViewController { 136 | 137 | @objc public func handleStopButton(_ button: UIButton) { 138 | self._broadcastViewController?.stop() 139 | self.presentConnectModal() 140 | } 141 | 142 | } 143 | 144 | // MARK: - MuxBroadcasterDelegate 145 | 146 | extension ViewController: MuxBroadcasterDelegate { 147 | 148 | public func muxBroadcaster(_ muxBroadcaster: MuxBroadcastViewController, didChangeState state: MuxLiveState) { 149 | print("🎬 MuxLive didChangeState, \(state.description)") 150 | 151 | switch state { 152 | case .ready: 153 | fallthrough 154 | case .stopped: 155 | // solid off-black ring 156 | self._streamStatusProgress?.progressTintColor = UIColor(hex: "#fb3064") 157 | self._streamStatusProgress?.updateProgress(0, animated: true, initialDelay: 0, completion: nil) 158 | self._streamStatusProgress?.enableIndeterminate(false, completion: nil) 159 | break 160 | case .pending: 161 | fallthrough 162 | case .retrying: 163 | // spinning red ring 164 | self._streamStatusProgress?.progressTintColor = UIColor(hex: "#fb3064") 165 | self._streamStatusProgress?.updateProgress(0.3, animated: true, initialDelay: 0, completion: nil) 166 | self._streamStatusProgress?.enableIndeterminate(true, completion: nil) 167 | break 168 | case .started: 169 | // solid red ring 170 | self._streamStatusProgress?.progressTintColor = UIColor(hex: "#fb3064") 171 | self._streamStatusProgress?.updateProgress(1.0, animated: true, initialDelay: 0, completion: nil) 172 | self._streamStatusProgress?.enableIndeterminate(false, completion: nil) 173 | break 174 | case .failed: 175 | // solid yellow ring 176 | self._streamStatusProgress?.progressTintColor = UIColor(hex: "#f7df48") 177 | self._streamStatusProgress?.updateProgress(1.0, animated: true, initialDelay: 0, completion: nil) 178 | self._streamStatusProgress?.enableIndeterminate(false, completion: nil) 179 | break 180 | } 181 | } 182 | 183 | } 184 | 185 | // MARK: - ConnectDelegate 186 | 187 | extension ViewController: ConnectDelegate { 188 | 189 | public func connectViewController(_ viewController: ConnectViewController, didConnectWithStreamKey streamKey: String) { 190 | // start a broadcast stream 191 | self._broadcastViewController?.start(withStreamKey: streamKey, interfaceOrientation: UIApplication.shared.statusBarOrientation) 192 | } 193 | 194 | } 195 | -------------------------------------------------------------------------------- /Framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Mux, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MuxLive.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'MuxLive' 3 | s.version = '0.0.1' 4 | s.license = 'MIT' 5 | s.summary = 'MuxLive SDK' 6 | s.authors = { "Mux, Inc." => "info@mux.com" } 7 | s.homepage = 'http://mux.com' 8 | s.source = { :git => 'https://github.com/muxinc/example-ios-live-streaming.git', :tag => s.version } 9 | s.ios.deployment_target = '11.0' 10 | s.source_files = 'Sources/*.swift' 11 | s.requires_arc = true 12 | s.swift_version = '4.0' 13 | s.dependency 'Alamofire', '~> 4.7' 14 | s.dependency 'LFLiveKit', '~> 2.6' 15 | s.dependency 'NextLevel', '~> 0.9' 16 | end 17 | -------------------------------------------------------------------------------- /MuxLive.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MuxLive.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MuxLive.xcodeproj/xcshareddata/xcschemes/Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /MuxLive.xcodeproj/xcshareddata/xcschemes/MuxLive.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 61 | 67 | 68 | 69 | 70 | 72 | 73 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /MuxLive.xcodeproj/xcshareddata/xcschemes/Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 70 | 72 | 73 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /MuxLive.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /MuxLive.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'MuxLive' do 4 | platform :ios, '11.0' 5 | 6 | pod 'Alamofire', '~> 4.7' 7 | pod 'LFLiveKit', '~> 2.6' 8 | pod 'NextLevel', '~> 0.16' 9 | pod 'RPCircularProgress', '0.5.0' 10 | pod 'Hue', '~> 5.0' 11 | end 12 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (4.9.1) 3 | - Hue (5.0.0) 4 | - LFLiveKit (2.6) 5 | - NextLevel (0.16.1) 6 | - RPCircularProgress (0.5.0) 7 | 8 | DEPENDENCIES: 9 | - Alamofire (~> 4.7) 10 | - Hue (~> 5.0) 11 | - LFLiveKit (~> 2.6) 12 | - NextLevel (~> 0.16) 13 | - RPCircularProgress (= 0.5.0) 14 | 15 | SPEC REPOS: 16 | trunk: 17 | - Alamofire 18 | - Hue 19 | - LFLiveKit 20 | - NextLevel 21 | - RPCircularProgress 22 | 23 | SPEC CHECKSUMS: 24 | Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18 25 | Hue: c129cb67be7d093a82bbbc30ce8a96757bf6f37a 26 | LFLiveKit: 2219563721f8aa0f188effc3395a06e2d53b23f2 27 | NextLevel: 38f7771c35b66f0caccdc2a3e130d8fb20652ede 28 | RPCircularProgress: 4499d4a1453dfbd3fe5bd8c6f344fd51cff3ad00 29 | 30 | PODFILE CHECKSUM: fae79d68b5e3edd75fd1e559dca38a690cffc628 31 | 32 | COCOAPODS: 1.8.4 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # This has been moved to [muxinc/examples](https://github.com/muxinc/examples/tree/master/ios-live-streaming) 2 | 3 | This README is out of date. This project has been moved to the Mux examples repo [muxinc/examples](https://github.com/muxinc/examples/tree/master/ios-live-streaming) 4 | -------------------------------------------------------------------------------- /Sources/MuxBroadcastViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MuxBroadcastViewController.swift 3 | // MuxLive 4 | // 5 | // Copyright (c) 2018 Mux, Inc. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in all 15 | // copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | // SOFTWARE. 24 | // 25 | 26 | import UIKit 27 | import Foundation 28 | import AVFoundation 29 | import NextLevel 30 | 31 | /// MuxBroadcasterDelegate, callback delegation for the broadcaster 32 | public protocol MuxBroadcasterDelegate: AnyObject { 33 | func muxBroadcaster(_ muxBroadcaster: MuxBroadcastViewController, didChangeState state: MuxLiveState) 34 | } 35 | 36 | /// MuxBroadcastViewController, provides a simple user interface and permissions handling for MuxLive streaming 37 | public class MuxBroadcastViewController: UIViewController { 38 | 39 | // MARK: - properties 40 | 41 | public weak var muxBroadcasterDelegate: MuxBroadcasterDelegate? 42 | 43 | public var liveState: MuxLiveState { 44 | get { 45 | return self._muxLive.liveState 46 | } 47 | } 48 | 49 | // MARK: - ivars 50 | 51 | internal var _previewView: UIView? 52 | internal var _muxLive: MuxLive = MuxLive() 53 | 54 | // MARK: - object lifecycle 55 | 56 | public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { 57 | super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) 58 | } 59 | 60 | public required init?(coder aDecoder: NSCoder) { 61 | fatalError("not supported") 62 | } 63 | 64 | // MARK: - view lifecycle 65 | 66 | public override func viewDidLoad() { 67 | super.viewDidLoad() 68 | 69 | self.view.backgroundColor = UIColor.black 70 | self.view.autoresizingMask = [.flexibleWidth, .flexibleHeight] 71 | 72 | // setup MuxLive and preview 73 | self._previewView = UIView(frame: self.view.bounds) 74 | if let previewView = self._previewView { 75 | self._muxLive.muxLiveDelegate = self 76 | self._muxLive.previewView = previewView 77 | self.view.addSubview(previewView) 78 | } 79 | 80 | // check permissions 81 | self.checkAndRequestCameraPermission() 82 | self.checkAndRequestMicrophonePermission() 83 | } 84 | 85 | private func getInterfaceOrientationMask() -> UIInterfaceOrientationMask { 86 | switch self.interfaceOrientation { 87 | case .unknown: 88 | return .portrait 89 | case .portraitUpsideDown: 90 | return .portraitUpsideDown 91 | case .landscapeLeft: 92 | return .landscapeLeft 93 | case .landscapeRight: 94 | return .landscapeRight 95 | case .portrait: 96 | return .portrait 97 | } 98 | } 99 | 100 | public override func viewWillAppear(_ animated: Bool) { 101 | super.viewWillAppear(animated) 102 | 103 | self._muxLive.isRunning = true 104 | } 105 | 106 | public override func viewWillDisappear(_ animated: Bool) { 107 | super.viewWillDisappear(animated) 108 | 109 | self._muxLive.isRunning = false 110 | self._muxLive.stop() 111 | } 112 | 113 | } 114 | 115 | // MARK: - status bar 116 | 117 | extension MuxBroadcastViewController { 118 | 119 | public override var preferredStatusBarStyle: UIStatusBarStyle { 120 | get { 121 | return .lightContent 122 | } 123 | } 124 | 125 | } 126 | 127 | // MARK: - MuxLiveDelegate 128 | 129 | extension MuxBroadcastViewController: MuxLiveDelegate { 130 | 131 | public func muxLive(_ muxLive: MuxLive, didChangeState state: MuxLiveState) { 132 | self.muxBroadcasterDelegate?.muxBroadcaster(self, didChangeState: state) 133 | } 134 | 135 | public func muxLive(_ muxLive: MuxLive, didFailWithError error: Error) { 136 | #if DEBUG 137 | print("MuxLive encountered an error, \(error)") 138 | #endif 139 | } 140 | 141 | } 142 | 143 | // MARK: - actions 144 | 145 | extension MuxBroadcastViewController { 146 | 147 | /// Start a MuxLive stream 148 | /// 149 | /// - Parameter streamKey: stream_key from api.mux.com 150 | public func start(withStreamKey streamKey: String, interfaceOrientation: UIInterfaceOrientation) { 151 | self._muxLive.start(withStreamKey: streamKey, interfaceOrientation) 152 | } 153 | 154 | /// Stop a MuxLive stream 155 | public func stop() { 156 | self._muxLive.stop() 157 | } 158 | 159 | } 160 | 161 | // MARK: - permissions 162 | 163 | extension MuxBroadcastViewController { 164 | 165 | /// Launch app settings 166 | /// 167 | /// - Parameters: 168 | /// - title: Message title string 169 | /// - message: Alert message 170 | open func launchAppSettings(withTitle title: String = NSLocalizedString("⚙️ settings", comment: "⚙️ settings"), 171 | message: String = NSLocalizedString("would you like to open settings?", comment: "would you like to open settings?")) { 172 | let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertController.Style.alert) 173 | 174 | let okAction = UIAlertAction(title: NSLocalizedString("open", comment: "open"), style: UIAlertAction.Style.default) { 175 | (action: UIAlertAction) in 176 | print("UIAlertAction open completion handler"); 177 | } 178 | let cancelAction = UIAlertAction(title: NSLocalizedString("cancel", comment: "cancel"), style: UIAlertAction.Style.cancel, handler: nil) 179 | alert.addAction(okAction) 180 | alert.addAction(cancelAction) 181 | 182 | self.present(alert, animated: true, completion: nil) 183 | } 184 | 185 | /// Check and request camera permission 186 | open func checkAndRequestCameraPermission() { 187 | let status = NextLevel.authorizationStatus(forMediaType: AVMediaType.video) 188 | if status == .notAuthorized { 189 | // looks like they previously denied access, prompt to open settings 190 | self.launchAppSettings(withTitle: NSLocalizedString("📸 camera access denied", comment: "📸 camera access denied"), 191 | message: NSLocalizedString("would you like to open settings?", comment: "would you like to open settings?")) 192 | } else { 193 | NextLevel.requestAuthorization(forMediaType: AVMediaType.video, completionHandler: { (AVMediaType, NextLevelAuthorizationStatus) in 194 | print("NextLevel.requestAuthorization video completion handler") 195 | }) 196 | } 197 | } 198 | 199 | /// Check and request mic permission 200 | open func checkAndRequestMicrophonePermission() { 201 | let status = NextLevel.authorizationStatus(forMediaType: AVMediaType.audio) 202 | if status == .notAuthorized { 203 | // looks like they previously denied access, prompt to open settings 204 | self.launchAppSettings(withTitle: NSLocalizedString("🎙 mic access denied", comment: "🎙 mic access denied"), 205 | message: NSLocalizedString("would you like to open settings?", comment: "would you like to open settings?")) 206 | } else { 207 | NextLevel.requestAuthorization(forMediaType: AVMediaType.audio, completionHandler: { (AVMediaType, NextLevelAuthorizationStatus) in 208 | print("NextLevel.requestAuthorization audio completion handler") 209 | }) 210 | } 211 | } 212 | 213 | } 214 | -------------------------------------------------------------------------------- /Sources/MuxLive.h: -------------------------------------------------------------------------------- 1 | // 2 | // MuxLive.h 3 | // MuxLive 4 | // 5 | // Copyright (c) 2018 Mux, Inc. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in all 15 | // copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | // SOFTWARE. 24 | // 25 | 26 | #import 27 | 28 | //! Project version number for MuxLive. 29 | FOUNDATION_EXPORT double MuxLiveVersionNumber; 30 | 31 | //! Project version string for MuxLive. 32 | FOUNDATION_EXPORT const unsigned char MuxLiveVersionString[]; 33 | -------------------------------------------------------------------------------- /Sources/MuxLiveConfiguration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MuxLiveConfiguration.swift 3 | // MuxLive 4 | // 5 | // Copyright (c) 2018 Mux, Inc. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in all 15 | // copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | // SOFTWARE. 24 | // 25 | 26 | import Foundation 27 | import AVFoundation 28 | import CoreGraphics 29 | 30 | /// MuxLive configuration 31 | public class MuxLiveConfiguration { 32 | } 33 | 34 | /// MuxLive audio configuration 35 | public class MuxLiveAudioConfiguration: MuxLiveConfiguration { 36 | 37 | /// Audio bit rate (kbps), AV dictionary key AVEncoderBitRateKey 38 | public var bitRate: Int = 96000 39 | 40 | /// Sample rate in hertz, AV dictionary key AVSampleRateKey 41 | public var sampleRate: Float64 = 44100 42 | 43 | /// Number of channels, AV dictionary key AVNumberOfChannelsKey 44 | public var channelsCount: Int? 45 | 46 | } 47 | 48 | /// MuxLive video configuration 49 | public class MuxLiveVideoConfiguration: MuxLiveConfiguration { 50 | 51 | /// Video frame rate 52 | public var frameRate: CMTimeScale = 30 53 | 54 | /// Max video frame rate 55 | public var maxFrameRate: CMTimeScale = 30 56 | 57 | /// Min video frame rate 58 | public var minFrameRate: CMTimeScale = 15 59 | 60 | /// Video bit rate (kbps) 61 | public var bitRate: Int = 800000 62 | 63 | /// Max video bit rate (kbps) 64 | public var maxBitRate: Int = 960000 65 | 66 | /// Min video bit rate (kbps) 67 | public var minBitRate: Int = 600000 68 | 69 | /// Dimensions for video output, AV dictionary keys AVVideoWidthKey, AVVideoHeightKey 70 | public var dimensions: CGSize? 71 | 72 | /// Maximum interval between key frames, 1 meaning key frames only, AV dictionary key AVVideoMaxKeyFrameIntervalKey 73 | public var maxKeyFrameInterval: Int? 74 | 75 | } 76 | -------------------------------------------------------------------------------- /build_docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Docs by jazzy 4 | # https://github.com/realm/jazzy 5 | # ------------------------------ 6 | 7 | jazzy \ 8 | --clean \ 9 | --author 'Mux Inc.' \ 10 | --author_url 'http://mux.com' \ 11 | --github_url 'http://github.com/muxinc/example-ios-live-streaming' \ 12 | --sdk iphonesimulator \ 13 | --xcodebuild-arguments -scheme,MuxLive \ 14 | --module 'MuxLive' \ 15 | --framework-root . \ 16 | --readme README.md \ 17 | --output docs/ 18 | -------------------------------------------------------------------------------- /docs/Enums.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enumerations Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

MuxLive Docs (60% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 89 |
90 |
91 |
92 |

Enumerations

93 |

The following enumerations are available globally.

94 | 95 |
96 |
97 |
98 |
99 | 100 | 101 | 102 |

types

103 |
104 |
105 |
    106 |
  • 107 |
    108 | 109 | 110 | 111 | MuxLiveState 112 | 113 |
    114 |
    115 |
    116 |
    117 |
    118 |
    119 |

    Stream state

    120 | 121 | See more 122 |
    123 |
    124 |

    Declaration

    125 |
    126 |

    Swift

    127 |
    public enum MuxLiveState : Int, CustomStringConvertible
    128 | 129 |
    130 |
    131 |
    132 |
    133 |
  • 134 |
  • 135 |
    136 | 137 | 138 | 139 | MuxLiveError 140 | 141 |
    142 |
    143 |
    144 |
    145 |
    146 |
    147 |

    Error types.

    148 | 149 | See more 150 |
    151 |
    152 |

    Declaration

    153 |
    154 |

    Swift

    155 |
    public enum MuxLiveError : Error, CustomStringConvertible
    156 | 157 |
    158 |
    159 |
    160 |
    161 |
  • 162 |
163 |
164 |
165 |
166 | 170 |
171 |
172 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /docs/Global Variables.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Global Variables Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

MuxLive Docs (60% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 89 |
90 |
91 |
92 |

Global Variables

93 |

The following global variables are available globally.

94 | 95 |
96 |
97 |
98 |
99 | 100 | 101 | 102 |

types

103 |
104 |
105 |
    106 |
  • 107 |
    108 | 109 | 110 | 111 | MuxLiveApiProductionHostname 112 | 113 |
    114 |
    115 |
    116 |
    117 |
    118 |
    119 |

    Undocumented

    120 | 121 |
    122 |
    123 |

    Declaration

    124 |
    125 |

    Swift

    126 |
    public let MuxLiveApiProductionHostname: String
    127 | 128 |
    129 |
    130 |
    131 |
    132 |
  • 133 |
  • 134 |
    135 | 136 | 137 | 138 | MuxLiveRtmpProductionUrl 139 | 140 |
    141 |
    142 |
    143 |
    144 |
    145 |
    146 |

    Undocumented

    147 | 148 |
    149 |
    150 |

    Declaration

    151 |
    152 |

    Swift

    153 |
    public let MuxLiveRtmpProductionUrl: String
    154 | 155 |
    156 |
    157 |
    158 |
    159 |
  • 160 |
  • 161 |
    162 | 163 | 164 | 165 | MuxLiveErrorDomain 166 | 167 |
    168 |
    169 |
    170 |
    171 |
    172 |
    173 |

    Error domain for all MuxLive errors.

    174 | 175 |
    176 |
    177 |

    Declaration

    178 |
    179 |

    Swift

    180 |
    public let MuxLiveErrorDomain: String
    181 | 182 |
    183 |
    184 |
    185 |
    186 |
  • 187 |
188 |
189 |
190 |
191 | 195 |
196 |
197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /docs/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

MuxLive Docs (60% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 89 |
90 |
91 |
92 |

Protocols

93 |

The following protocols are available globally.

94 | 95 |
96 |
97 |
98 |
    99 |
  • 100 |
    101 | 102 | 103 | 104 | MuxBroadcasterDelegate 105 | 106 |
    107 |
    108 |
    109 |
    110 |
    111 |
    112 |

    MuxBroadcasterDelegate, callback delegation for the broadcaster

    113 | 114 | See more 115 |
    116 |
    117 |

    Declaration

    118 |
    119 |

    Swift

    120 |
    public protocol MuxBroadcasterDelegate : NSObjectProtocol
    121 | 122 |
    123 |
    124 |
    125 |
    126 |
  • 127 |
128 |
129 |
130 |
131 | 132 | 133 | 134 |

MuxLive

135 |
136 |
137 |
    138 |
  • 139 |
    140 | 141 | 142 | 143 | MuxLiveDelegate 144 | 145 |
    146 |
    147 |
    148 |
    149 |
    150 |
    151 |

    MuxLiveDelegate protocol, callback for receiving updates from MuxLive

    152 | 153 | See more 154 |
    155 |
    156 |

    Declaration

    157 |
    158 |

    Swift

    159 |
    public protocol MuxLiveDelegate : NSObjectProtocol
    160 | 161 |
    162 |
    163 |
    164 |
    165 |
  • 166 |
167 |
168 |
169 |
170 | 174 |
175 |
176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /docs/Protocols/MuxBroadcasterDelegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MuxBroadcasterDelegate Protocol Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

MuxLive Docs (60% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 89 |
90 |
91 |
92 |

MuxBroadcasterDelegate

93 |
94 |
95 |
public protocol MuxBroadcasterDelegate : NSObjectProtocol
96 | 97 |
98 |
99 |

MuxBroadcasterDelegate, callback delegation for the broadcaster

100 | 101 |
102 |
103 |
104 | 133 |
134 |
135 |
136 | 140 |
141 |
142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /docs/Protocols/MuxLiveDelegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MuxLiveDelegate Protocol Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

MuxLive Docs (60% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 89 |
90 |
91 |
92 |

MuxLiveDelegate

93 |
94 |
95 |
public protocol MuxLiveDelegate : NSObjectProtocol
96 | 97 |
98 |
99 |

MuxLiveDelegate protocol, callback for receiving updates from MuxLive

100 | 101 |
102 |
103 |
104 |
    105 |
  • 106 |
    107 | 108 | 109 | 110 | muxLive(_:didChangeState:) 111 | 112 |
    113 |
    114 |
    115 |
    116 |
    117 |
    118 |

    Undocumented

    119 | 120 |
    121 |
    122 |

    Declaration

    123 |
    124 |

    Swift

    125 |
    func muxLive(_ muxLive: MuxLive, didChangeState state: MuxLiveState)
    126 | 127 |
    128 |
    129 |
    130 |
    131 |
  • 132 |
  • 133 |
    134 | 135 | 136 | 137 | muxLive(_:didFailWithError:) 138 | 139 |
    140 |
    141 |
    142 |
    143 |
    144 |
    145 |

    Undocumented

    146 | 147 |
    148 |
    149 |

    Declaration

    150 |
    151 |

    Swift

    152 |
    func muxLive(_ muxLive: MuxLive, didFailWithError error: Error)
    153 | 154 |
    155 |
    156 |
    157 |
    158 |
  • 159 |
160 |
161 |
162 |
163 | 167 |
168 |
169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /docs/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 60% 23 | 24 | 25 | 60% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 1; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 1; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; 143 | white-space: nowrap; } 144 | .nav-group-task a { 145 | color: #888; } 146 | 147 | .main-content { 148 | background-color: #fff; 149 | border: 1px solid #e2e2e2; 150 | margin-left: 246px; 151 | position: absolute; 152 | overflow: hidden; 153 | padding-bottom: 60px; 154 | top: 70px; 155 | width: 734px; } 156 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 157 | margin-bottom: 1em; } 158 | .main-content p { 159 | line-height: 1.8em; } 160 | .main-content section .section:first-child { 161 | margin-top: 0; 162 | padding-top: 0; } 163 | .main-content section .task-group-section .task-group:first-of-type { 164 | padding-top: 10px; } 165 | .main-content section .task-group-section .task-group:first-of-type .section-name { 166 | padding-top: 15px; } 167 | .main-content section .heading:before { 168 | content: ""; 169 | display: block; 170 | padding-top: 70px; 171 | margin: -70px 0 0; } 172 | 173 | .section { 174 | padding: 0 25px; } 175 | 176 | .highlight { 177 | background-color: #eee; 178 | padding: 10px 12px; 179 | border: 1px solid #e2e2e2; 180 | border-radius: 4px; 181 | overflow-x: auto; } 182 | 183 | .declaration .highlight { 184 | overflow-x: initial; 185 | padding: 0 40px 40px 0; 186 | margin-bottom: -25px; 187 | background-color: transparent; 188 | border: none; } 189 | 190 | .section-name { 191 | margin: 0; 192 | margin-left: 18px; } 193 | 194 | .task-group-section { 195 | padding-left: 6px; 196 | border-top: 1px solid #e2e2e2; } 197 | 198 | .task-group { 199 | padding-top: 0px; } 200 | 201 | .task-name-container a[name]:before { 202 | content: ""; 203 | display: block; 204 | padding-top: 70px; 205 | margin: -70px 0 0; } 206 | 207 | .item { 208 | padding-top: 8px; 209 | width: 100%; 210 | list-style-type: none; } 211 | .item a[name]:before { 212 | content: ""; 213 | display: block; 214 | padding-top: 70px; 215 | margin: -70px 0 0; } 216 | .item code { 217 | background-color: transparent; 218 | padding: 0; } 219 | .item .token { 220 | padding-left: 3px; 221 | margin-left: 15px; 222 | font-size: 11.9px; } 223 | .item .declaration-note { 224 | font-size: .85em; 225 | color: gray; 226 | font-style: italic; } 227 | 228 | .pointer-container { 229 | border-bottom: 1px solid #e2e2e2; 230 | left: -23px; 231 | padding-bottom: 13px; 232 | position: relative; 233 | width: 110%; } 234 | 235 | .pointer { 236 | background: #f9f9f9; 237 | border-left: 1px solid #e2e2e2; 238 | border-top: 1px solid #e2e2e2; 239 | height: 12px; 240 | left: 21px; 241 | top: -7px; 242 | -webkit-transform: rotate(45deg); 243 | -moz-transform: rotate(45deg); 244 | -o-transform: rotate(45deg); 245 | transform: rotate(45deg); 246 | position: absolute; 247 | width: 12px; } 248 | 249 | .height-container { 250 | display: none; 251 | left: -25px; 252 | padding: 0 25px; 253 | position: relative; 254 | width: 100%; 255 | overflow: hidden; } 256 | .height-container .section { 257 | background: #f9f9f9; 258 | border-bottom: 1px solid #e2e2e2; 259 | left: -25px; 260 | position: relative; 261 | width: 100%; 262 | padding-top: 10px; 263 | padding-bottom: 5px; } 264 | 265 | .aside, .language { 266 | padding: 6px 12px; 267 | margin: 12px 0; 268 | border-left: 5px solid #dddddd; 269 | overflow-y: hidden; } 270 | .aside .aside-title, .language .aside-title { 271 | font-size: 9px; 272 | letter-spacing: 2px; 273 | text-transform: uppercase; 274 | padding-bottom: 0; 275 | margin: 0; 276 | color: #aaa; 277 | -webkit-user-select: none; } 278 | .aside p:last-child, .language p:last-child { 279 | margin-bottom: 0; } 280 | 281 | .language { 282 | border-left: 5px solid #cde9f4; } 283 | .language .aside-title { 284 | color: #4b8afb; } 285 | 286 | .aside-warning { 287 | border-left: 5px solid #ff6666; } 288 | .aside-warning .aside-title { 289 | color: #ff0000; } 290 | 291 | .graybox { 292 | border-collapse: collapse; 293 | width: 100%; } 294 | .graybox p { 295 | margin: 0; 296 | word-break: break-word; 297 | min-width: 50px; } 298 | .graybox td { 299 | border: 1px solid #e2e2e2; 300 | padding: 5px 25px 5px 10px; 301 | vertical-align: middle; } 302 | .graybox tr td:first-of-type { 303 | text-align: right; 304 | padding: 7px; 305 | vertical-align: top; 306 | word-break: normal; 307 | width: 40px; } 308 | 309 | .slightly-smaller { 310 | font-size: 0.9em; } 311 | 312 | #footer { 313 | position: absolute; 314 | bottom: 10px; 315 | margin-left: 25px; } 316 | #footer p { 317 | margin: 0; 318 | color: #aaa; 319 | font-size: 0.8em; } 320 | 321 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 322 | display: none; } 323 | html.dash .main-content { 324 | width: 980px; 325 | margin-left: 0; 326 | border: none; 327 | width: 100%; 328 | top: 0; 329 | padding-bottom: 0; } 330 | html.dash .height-container { 331 | display: block; } 332 | html.dash .item .token { 333 | margin-left: 0; } 334 | html.dash .content-wrapper { 335 | width: auto; } 336 | html.dash #footer { 337 | position: static; } 338 | -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.muxlive 7 | CFBundleName 8 | MuxLive 9 | DocSetPlatformFamily 10 | muxlive 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/Documents/Enums.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enumerations Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

MuxLive Docs (60% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 89 |
90 |
91 |
92 |

Enumerations

93 |

The following enumerations are available globally.

94 | 95 |
96 |
97 |
98 |
99 | 100 | 101 | 102 |

types

103 |
104 |
105 |
    106 |
  • 107 |
    108 | 109 | 110 | 111 | MuxLiveState 112 | 113 |
    114 |
    115 |
    116 |
    117 |
    118 |
    119 |

    Stream state

    120 | 121 | See more 122 |
    123 |
    124 |

    Declaration

    125 |
    126 |

    Swift

    127 |
    public enum MuxLiveState : Int, CustomStringConvertible
    128 | 129 |
    130 |
    131 |
    132 |
    133 |
  • 134 |
  • 135 |
    136 | 137 | 138 | 139 | MuxLiveError 140 | 141 |
    142 |
    143 |
    144 |
    145 |
    146 |
    147 |

    Error types.

    148 | 149 | See more 150 |
    151 |
    152 |

    Declaration

    153 |
    154 |

    Swift

    155 |
    public enum MuxLiveError : Error, CustomStringConvertible
    156 | 157 |
    158 |
    159 |
    160 |
    161 |
  • 162 |
163 |
164 |
165 |
166 | 170 |
171 |
172 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/Documents/Global Variables.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Global Variables Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

MuxLive Docs (60% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 89 |
90 |
91 |
92 |

Global Variables

93 |

The following global variables are available globally.

94 | 95 |
96 |
97 |
98 |
99 | 100 | 101 | 102 |

types

103 |
104 |
105 |
    106 |
  • 107 |
    108 | 109 | 110 | 111 | MuxLiveApiProductionHostname 112 | 113 |
    114 |
    115 |
    116 |
    117 |
    118 |
    119 |

    Undocumented

    120 | 121 |
    122 |
    123 |

    Declaration

    124 |
    125 |

    Swift

    126 |
    public let MuxLiveApiProductionHostname: String
    127 | 128 |
    129 |
    130 |
    131 |
    132 |
  • 133 |
  • 134 |
    135 | 136 | 137 | 138 | MuxLiveRtmpProductionUrl 139 | 140 |
    141 |
    142 |
    143 |
    144 |
    145 |
    146 |

    Undocumented

    147 | 148 |
    149 |
    150 |

    Declaration

    151 |
    152 |

    Swift

    153 |
    public let MuxLiveRtmpProductionUrl: String
    154 | 155 |
    156 |
    157 |
    158 |
    159 |
  • 160 |
  • 161 |
    162 | 163 | 164 | 165 | MuxLiveErrorDomain 166 | 167 |
    168 |
    169 |
    170 |
    171 |
    172 |
    173 |

    Error domain for all MuxLive errors.

    174 | 175 |
    176 |
    177 |

    Declaration

    178 |
    179 |

    Swift

    180 |
    public let MuxLiveErrorDomain: String
    181 | 182 |
    183 |
    184 |
    185 |
    186 |
  • 187 |
188 |
189 |
190 |
191 | 195 |
196 |
197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/Documents/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

MuxLive Docs (60% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 89 |
90 |
91 |
92 |

Protocols

93 |

The following protocols are available globally.

94 | 95 |
96 |
97 |
98 |
    99 |
  • 100 |
    101 | 102 | 103 | 104 | MuxBroadcasterDelegate 105 | 106 |
    107 |
    108 |
    109 |
    110 |
    111 |
    112 |

    MuxBroadcasterDelegate, callback delegation for the broadcaster

    113 | 114 | See more 115 |
    116 |
    117 |

    Declaration

    118 |
    119 |

    Swift

    120 |
    public protocol MuxBroadcasterDelegate : NSObjectProtocol
    121 | 122 |
    123 |
    124 |
    125 |
    126 |
  • 127 |
128 |
129 |
130 |
131 | 132 | 133 | 134 |

MuxLive

135 |
136 |
137 |
    138 |
  • 139 |
    140 | 141 | 142 | 143 | MuxLiveDelegate 144 | 145 |
    146 |
    147 |
    148 |
    149 |
    150 |
    151 |

    MuxLiveDelegate protocol, callback for receiving updates from MuxLive

    152 | 153 | See more 154 |
    155 |
    156 |

    Declaration

    157 |
    158 |

    Swift

    159 |
    public protocol MuxLiveDelegate : NSObjectProtocol
    160 | 161 |
    162 |
    163 |
    164 |
    165 |
  • 166 |
167 |
168 |
169 |
170 | 174 |
175 |
176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/Documents/Protocols/MuxBroadcasterDelegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MuxBroadcasterDelegate Protocol Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

MuxLive Docs (60% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 89 |
90 |
91 |
92 |

MuxBroadcasterDelegate

93 |
94 |
95 |
public protocol MuxBroadcasterDelegate : NSObjectProtocol
96 | 97 |
98 |
99 |

MuxBroadcasterDelegate, callback delegation for the broadcaster

100 | 101 |
102 |
103 |
104 | 133 |
134 |
135 |
136 | 140 |
141 |
142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/Documents/Protocols/MuxLiveDelegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MuxLiveDelegate Protocol Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

MuxLive Docs (60% documented)

18 |

View on GitHub

19 |
20 |
21 |
22 | 27 |
28 |
29 | 89 |
90 |
91 |
92 |

MuxLiveDelegate

93 |
94 |
95 |
public protocol MuxLiveDelegate : NSObjectProtocol
96 | 97 |
98 |
99 |

MuxLiveDelegate protocol, callback for receiving updates from MuxLive

100 | 101 |
102 |
103 |
104 |
    105 |
  • 106 |
    107 | 108 | 109 | 110 | muxLive(_:didChangeState:) 111 | 112 |
    113 |
    114 |
    115 |
    116 |
    117 |
    118 |

    Undocumented

    119 | 120 |
    121 |
    122 |

    Declaration

    123 |
    124 |

    Swift

    125 |
    func muxLive(_ muxLive: MuxLive, didChangeState state: MuxLiveState)
    126 | 127 |
    128 |
    129 |
    130 |
    131 |
  • 132 |
  • 133 |
    134 | 135 | 136 | 137 | muxLive(_:didFailWithError:) 138 | 139 |
    140 |
    141 |
    142 |
    143 |
    144 |
    145 |

    Undocumented

    146 | 147 |
    148 |
    149 |

    Declaration

    150 |
    151 |

    Swift

    152 |
    func muxLive(_ muxLive: MuxLive, didFailWithError error: Error)
    153 | 154 |
    155 |
    156 |
    157 |
    158 |
  • 159 |
160 |
161 |
162 |
163 | 167 |
168 |
169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/Documents/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 1; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 1; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; 143 | white-space: nowrap; } 144 | .nav-group-task a { 145 | color: #888; } 146 | 147 | .main-content { 148 | background-color: #fff; 149 | border: 1px solid #e2e2e2; 150 | margin-left: 246px; 151 | position: absolute; 152 | overflow: hidden; 153 | padding-bottom: 60px; 154 | top: 70px; 155 | width: 734px; } 156 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 157 | margin-bottom: 1em; } 158 | .main-content p { 159 | line-height: 1.8em; } 160 | .main-content section .section:first-child { 161 | margin-top: 0; 162 | padding-top: 0; } 163 | .main-content section .task-group-section .task-group:first-of-type { 164 | padding-top: 10px; } 165 | .main-content section .task-group-section .task-group:first-of-type .section-name { 166 | padding-top: 15px; } 167 | .main-content section .heading:before { 168 | content: ""; 169 | display: block; 170 | padding-top: 70px; 171 | margin: -70px 0 0; } 172 | 173 | .section { 174 | padding: 0 25px; } 175 | 176 | .highlight { 177 | background-color: #eee; 178 | padding: 10px 12px; 179 | border: 1px solid #e2e2e2; 180 | border-radius: 4px; 181 | overflow-x: auto; } 182 | 183 | .declaration .highlight { 184 | overflow-x: initial; 185 | padding: 0 40px 40px 0; 186 | margin-bottom: -25px; 187 | background-color: transparent; 188 | border: none; } 189 | 190 | .section-name { 191 | margin: 0; 192 | margin-left: 18px; } 193 | 194 | .task-group-section { 195 | padding-left: 6px; 196 | border-top: 1px solid #e2e2e2; } 197 | 198 | .task-group { 199 | padding-top: 0px; } 200 | 201 | .task-name-container a[name]:before { 202 | content: ""; 203 | display: block; 204 | padding-top: 70px; 205 | margin: -70px 0 0; } 206 | 207 | .item { 208 | padding-top: 8px; 209 | width: 100%; 210 | list-style-type: none; } 211 | .item a[name]:before { 212 | content: ""; 213 | display: block; 214 | padding-top: 70px; 215 | margin: -70px 0 0; } 216 | .item code { 217 | background-color: transparent; 218 | padding: 0; } 219 | .item .token { 220 | padding-left: 3px; 221 | margin-left: 15px; 222 | font-size: 11.9px; } 223 | .item .declaration-note { 224 | font-size: .85em; 225 | color: gray; 226 | font-style: italic; } 227 | 228 | .pointer-container { 229 | border-bottom: 1px solid #e2e2e2; 230 | left: -23px; 231 | padding-bottom: 13px; 232 | position: relative; 233 | width: 110%; } 234 | 235 | .pointer { 236 | background: #f9f9f9; 237 | border-left: 1px solid #e2e2e2; 238 | border-top: 1px solid #e2e2e2; 239 | height: 12px; 240 | left: 21px; 241 | top: -7px; 242 | -webkit-transform: rotate(45deg); 243 | -moz-transform: rotate(45deg); 244 | -o-transform: rotate(45deg); 245 | transform: rotate(45deg); 246 | position: absolute; 247 | width: 12px; } 248 | 249 | .height-container { 250 | display: none; 251 | left: -25px; 252 | padding: 0 25px; 253 | position: relative; 254 | width: 100%; 255 | overflow: hidden; } 256 | .height-container .section { 257 | background: #f9f9f9; 258 | border-bottom: 1px solid #e2e2e2; 259 | left: -25px; 260 | position: relative; 261 | width: 100%; 262 | padding-top: 10px; 263 | padding-bottom: 5px; } 264 | 265 | .aside, .language { 266 | padding: 6px 12px; 267 | margin: 12px 0; 268 | border-left: 5px solid #dddddd; 269 | overflow-y: hidden; } 270 | .aside .aside-title, .language .aside-title { 271 | font-size: 9px; 272 | letter-spacing: 2px; 273 | text-transform: uppercase; 274 | padding-bottom: 0; 275 | margin: 0; 276 | color: #aaa; 277 | -webkit-user-select: none; } 278 | .aside p:last-child, .language p:last-child { 279 | margin-bottom: 0; } 280 | 281 | .language { 282 | border-left: 5px solid #cde9f4; } 283 | .language .aside-title { 284 | color: #4b8afb; } 285 | 286 | .aside-warning { 287 | border-left: 5px solid #ff6666; } 288 | .aside-warning .aside-title { 289 | color: #ff0000; } 290 | 291 | .graybox { 292 | border-collapse: collapse; 293 | width: 100%; } 294 | .graybox p { 295 | margin: 0; 296 | word-break: break-word; 297 | min-width: 50px; } 298 | .graybox td { 299 | border: 1px solid #e2e2e2; 300 | padding: 5px 25px 5px 10px; 301 | vertical-align: middle; } 302 | .graybox tr td:first-of-type { 303 | text-align: right; 304 | padding: 7px; 305 | vertical-align: top; 306 | word-break: normal; 307 | width: 40px; } 308 | 309 | .slightly-smaller { 310 | font-size: 0.9em; } 311 | 312 | #footer { 313 | position: absolute; 314 | bottom: 10px; 315 | margin-left: 25px; } 316 | #footer p { 317 | margin: 0; 318 | color: #aaa; 319 | font-size: 0.8em; } 320 | 321 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 322 | display: none; } 323 | html.dash .main-content { 324 | width: 980px; 325 | margin-left: 0; 326 | border: none; 327 | width: 100%; 328 | top: 0; 329 | padding-bottom: 0; } 330 | html.dash .height-container { 331 | display: block; } 332 | html.dash .item .token { 333 | margin-left: 0; } 334 | html.dash .content-wrapper { 335 | width: auto; } 336 | html.dash #footer { 337 | position: static; } 338 | -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/docs/docsets/MuxLive.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/docs/docsets/MuxLive.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/docs/docsets/MuxLive.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/Documents/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MuxLive Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

MuxLive Docs (60% documented)

17 |

View on GitHub

18 |
19 |
20 |
21 | 26 |
27 |
28 | 88 |
89 |
90 |
91 | 92 |

example-ios-live-streaming

93 | 94 |

An example app for live streaming from an iOS device using the Mux live streaming service, written in Swift.

95 | 96 |

Swift Version GitHub license

97 |

Welcome

98 | 99 |

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.

100 |

Quick Start

101 |

Sample Project Setup

102 | 103 |

After cloning this project and installing CocoaPods, run the following command from the project directory to get setup:

104 |
make setup && make pods
105 | 
106 | 107 |

Then just open the workspace and click play to build and run.

108 |
open *workspace
109 | 
110 |

Components

111 | 112 |
    113 |
  • MuxLive.swift is a component that provides the basic network streaming capabilities and properties for configuration.

  • 114 |
  • MuxLiveConfiguration.swift describes MuxLive.swift‘s configuration properties.

  • 115 |
  • MuxBroadcastViewController.swift provides a simple camera user interface and wraps MuxLive.swift, providing examples on how to use MuxLive.swift directly (if that is preferred).

  • 116 |
117 |

Integration

118 | 119 |

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:

120 |

121 | # CocoaPods (not current supported! maybe? we have to figure that out.)
122 | 
123 | pod "MuxLive", "~> 0.0.1"
124 | 
125 | # Carthage
126 | 
127 | github "muxinc/example-ios-live-streaming" ~> 0.0.1
128 | 
129 | # Swift PM
130 | 
131 | let package = Package(
132 |     dependencies: [
133 |         .Package(url: "https://github.com/muxinc/example-ios-live-streaming", majorVersion: 0)
134 |     ]
135 | )
136 | 
137 | 
138 | 139 |

Alternatively, you can just copy all the source files into your Xcode project.

140 |

Documentation

141 | 142 |

You can find the docs here. Documentation is generated with jazzy and hosted on GitHub-Pages.

143 |

Resources

144 | 145 | 155 |

License

156 | 157 |

example-ios-live-streaming and MuxLive are available under the MIT license, see the LICENSE file for more information.

158 | 159 |
160 |
161 | 165 |
166 |
167 | 168 | 169 | 170 | -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /docs/docsets/MuxLive.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/docs/docsets/MuxLive.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/MuxLive.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/docs/docsets/MuxLive.tgz -------------------------------------------------------------------------------- /docs/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/docs/img/carat.png -------------------------------------------------------------------------------- /docs/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/docs/img/dash.png -------------------------------------------------------------------------------- /docs/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muxinc/example-ios-live-streaming/839d40724f98c75e7f2decf11f0d0c941a900626/docs/img/gh.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MuxLive Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

MuxLive Docs (60% documented)

17 |

View on GitHub

18 |
19 |
20 |
21 | 26 |
27 |
28 | 88 |
89 |
90 |
91 | 92 |

example-ios-live-streaming

93 | 94 |

An example app for live streaming from an iOS device using the Mux live streaming service, written in Swift.

95 | 96 |

Swift Version GitHub license

97 |

Welcome

98 | 99 |

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.

100 |

Quick Start

101 |

Sample Project Setup

102 | 103 |

After cloning this project and installing CocoaPods, run the following command from the project directory to get setup:

104 |
make setup && make pods
105 | 
106 | 107 |

Then just open the workspace and click play to build and run.

108 |
open *workspace
109 | 
110 |

Components

111 | 112 |
    113 |
  • MuxLive.swift is a component that provides the basic network streaming capabilities and properties for configuration.

  • 114 |
  • MuxLiveConfiguration.swift describes MuxLive.swift‘s configuration properties.

  • 115 |
  • MuxBroadcastViewController.swift provides a simple camera user interface and wraps MuxLive.swift, providing examples on how to use MuxLive.swift directly (if that is preferred).

  • 116 |
117 |

Integration

118 | 119 |

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:

120 |

121 | # CocoaPods (not current supported! maybe? we have to figure that out.)
122 | 
123 | pod "MuxLive", "~> 0.0.1"
124 | 
125 | # Carthage
126 | 
127 | github "muxinc/example-ios-live-streaming" ~> 0.0.1
128 | 
129 | # Swift PM
130 | 
131 | let package = Package(
132 |     dependencies: [
133 |         .Package(url: "https://github.com/muxinc/example-ios-live-streaming", majorVersion: 0)
134 |     ]
135 | )
136 | 
137 | 
138 | 139 |

Alternatively, you can just copy all the source files into your Xcode project.

140 |

Documentation

141 | 142 |

You can find the docs here. Documentation is generated with jazzy and hosted on GitHub-Pages.

143 |

Resources

144 | 145 | 155 |

License

156 | 157 |

example-ios-live-streaming and MuxLive are available under the MIT license, see the LICENSE file for more information.

158 | 159 |
160 |
161 | 165 |
166 |
167 | 168 | 169 | 170 | -------------------------------------------------------------------------------- /docs/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /docs/undocumented.json: -------------------------------------------------------------------------------- 1 | { 2 | "warnings": [ 3 | { 4 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxBroadcastViewController.swift", 5 | "line": 33, 6 | "symbol": "MuxBroadcasterDelegate.muxBroadcaster(_:didChangeState:)", 7 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 8 | "warning": "undocumented" 9 | }, 10 | { 11 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxBroadcastViewController.swift", 12 | "line": 41, 13 | "symbol": "MuxBroadcastViewController.muxBroadcasterDelegate", 14 | "symbol_kind": "source.lang.swift.decl.var.instance", 15 | "warning": "undocumented" 16 | }, 17 | { 18 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxBroadcastViewController.swift", 19 | "line": 43, 20 | "symbol": "MuxBroadcastViewController.liveState", 21 | "symbol_kind": "source.lang.swift.decl.var.instance", 22 | "warning": "undocumented" 23 | }, 24 | { 25 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxBroadcastViewController.swift", 26 | "line": 56, 27 | "symbol": "MuxBroadcastViewController.init(nibName:bundle:)", 28 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 29 | "warning": "undocumented" 30 | }, 31 | { 32 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxBroadcastViewController.swift", 33 | "line": 60, 34 | "symbol": "MuxBroadcastViewController.init(coder:)", 35 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 36 | "warning": "undocumented" 37 | }, 38 | { 39 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxBroadcastViewController.swift", 40 | "line": 66, 41 | "symbol": "MuxBroadcastViewController.viewDidLoad()", 42 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 43 | "warning": "undocumented" 44 | }, 45 | { 46 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxBroadcastViewController.swift", 47 | "line": 85, 48 | "symbol": "MuxBroadcastViewController.viewWillAppear(_:)", 49 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 50 | "warning": "undocumented" 51 | }, 52 | { 53 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxBroadcastViewController.swift", 54 | "line": 91, 55 | "symbol": "MuxBroadcastViewController.viewWillDisappear(_:)", 56 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 57 | "warning": "undocumented" 58 | }, 59 | { 60 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxBroadcastViewController.swift", 61 | "line": 104, 62 | "symbol": "MuxBroadcastViewController.preferredStatusBarStyle", 63 | "symbol_kind": "source.lang.swift.decl.var.instance", 64 | "warning": "undocumented" 65 | }, 66 | { 67 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxBroadcastViewController.swift", 68 | "line": 116, 69 | "symbol": "MuxBroadcastViewController.muxLive(_:didChangeState:)", 70 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 71 | "warning": "undocumented" 72 | }, 73 | { 74 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxBroadcastViewController.swift", 75 | "line": 120, 76 | "symbol": "MuxBroadcastViewController.muxLive(_:didFailWithError:)", 77 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 78 | "warning": "undocumented" 79 | }, 80 | { 81 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 82 | "line": 33, 83 | "symbol": "MuxLiveApiProductionHostname", 84 | "symbol_kind": "source.lang.swift.decl.var.global", 85 | "warning": "undocumented" 86 | }, 87 | { 88 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 89 | "line": 34, 90 | "symbol": "MuxLiveRtmpProductionUrl", 91 | "symbol_kind": "source.lang.swift.decl.var.global", 92 | "warning": "undocumented" 93 | }, 94 | { 95 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 96 | "line": 38, 97 | "symbol": "MuxLiveState.ready", 98 | "symbol_kind": "source.lang.swift.decl.enumelement", 99 | "warning": "undocumented" 100 | }, 101 | { 102 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 103 | "line": 39, 104 | "symbol": "MuxLiveState.pending", 105 | "symbol_kind": "source.lang.swift.decl.enumelement", 106 | "warning": "undocumented" 107 | }, 108 | { 109 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 110 | "line": 40, 111 | "symbol": "MuxLiveState.started", 112 | "symbol_kind": "source.lang.swift.decl.enumelement", 113 | "warning": "undocumented" 114 | }, 115 | { 116 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 117 | "line": 41, 118 | "symbol": "MuxLiveState.stopped", 119 | "symbol_kind": "source.lang.swift.decl.enumelement", 120 | "warning": "undocumented" 121 | }, 122 | { 123 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 124 | "line": 42, 125 | "symbol": "MuxLiveState.failed", 126 | "symbol_kind": "source.lang.swift.decl.enumelement", 127 | "warning": "undocumented" 128 | }, 129 | { 130 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 131 | "line": 43, 132 | "symbol": "MuxLiveState.retrying", 133 | "symbol_kind": "source.lang.swift.decl.enumelement", 134 | "warning": "undocumented" 135 | }, 136 | { 137 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 138 | "line": 70, 139 | "symbol": "MuxLiveError.unknown", 140 | "symbol_kind": "source.lang.swift.decl.enumelement", 141 | "warning": "undocumented" 142 | }, 143 | { 144 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 145 | "line": 71, 146 | "symbol": "MuxLiveError.streamingInfoFailure", 147 | "symbol_kind": "source.lang.swift.decl.enumelement", 148 | "warning": "undocumented" 149 | }, 150 | { 151 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 152 | "line": 72, 153 | "symbol": "MuxLiveError.connectionFailure", 154 | "symbol_kind": "source.lang.swift.decl.enumelement", 155 | "warning": "undocumented" 156 | }, 157 | { 158 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 159 | "line": 73, 160 | "symbol": "MuxLiveError.verificationFailure", 161 | "symbol_kind": "source.lang.swift.decl.enumelement", 162 | "warning": "undocumented" 163 | }, 164 | { 165 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 166 | "line": 74, 167 | "symbol": "MuxLiveError.timeout", 168 | "symbol_kind": "source.lang.swift.decl.enumelement", 169 | "warning": "undocumented" 170 | }, 171 | { 172 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 173 | "line": 76, 174 | "symbol": "MuxLiveError.code", 175 | "symbol_kind": "source.lang.swift.decl.var.instance", 176 | "warning": "undocumented" 177 | }, 178 | { 179 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 180 | "line": 115, 181 | "symbol": "MuxLiveDelegate.muxLive(_:didChangeState:)", 182 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 183 | "warning": "undocumented" 184 | }, 185 | { 186 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 187 | "line": 116, 188 | "symbol": "MuxLiveDelegate.muxLive(_:didFailWithError:)", 189 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 190 | "warning": "undocumented" 191 | }, 192 | { 193 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 194 | "line": 300, 195 | "symbol": "MuxLive.liveSession(_:debugInfo:)", 196 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 197 | "warning": "undocumented" 198 | }, 199 | { 200 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 201 | "line": 304, 202 | "symbol": "MuxLive.liveSession(_:liveStateDidChange:)", 203 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 204 | "warning": "undocumented" 205 | }, 206 | { 207 | "file": "/Users/piemonte/Source/example-ios-live-streaming/Sources/MuxLive.swift", 208 | "line": 309, 209 | "symbol": "MuxLive.liveSession(_:errorCode:)", 210 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 211 | "warning": "undocumented" 212 | } 213 | ], 214 | "source_directory": "/Users/piemonte/Source/example-ios-live-streaming" 215 | } -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | # setup pods 2 | setup: 3 | @echo [installing cocoapods] 4 | @sudo /usr/bin/gem install -n /usr/local/bin cocoapods --pre 5 | @pod setup 6 | 7 | pods: 8 | @echo [updating pods] 9 | @echo ensure you have the latest cocoapods, run make setup 10 | @echo 11 | @-rm Podfile.lock 12 | @-rm -rf Pods 13 | @pod install 14 | 15 | cleanpods: 16 | @echo [removing local Pods caches] 17 | @echo /Users/$$USER/.cocoapods/* 18 | @echo ensure to re-run make setup! 19 | @-rm -rf /Users/$$USER/.cocoapods/* 20 | 21 | .PHONY: setup pods cleanpods 22 | --------------------------------------------------------------------------------