RTMPConnection
public class RTMPConnection
extension RTMPConnection: EventDispatcherConvertible
The RTMPConneciton class create a two-way RTMP connection.
-
The default network’s window size for RTMPConnection.
Declaration
Swift
public static let defaultWindowSizeS: Int64
-
The supported protocols are rtmp, rtmps, rtmpt and rtmps.
Declaration
Swift
public static let supportedProtocols: Set<String>
-
The supported fourCcList are hvc1.
Declaration
Swift
public static let supportedFourCcList: [String]
-
The default RTMP port is 1935.
Declaration
Swift
public static let defaultPort: Int
-
The default RTMPS port is 443.
Declaration
Swift
public static let defaultSecurePort: Int
-
The default flashVer is FMLE/3.0 (compatible; FMSc/1.0).
Declaration
Swift
public static let defaultFlashVer: String
-
The default chunk size for RTMPConnection.
Declaration
Swift
public static let defaultChunkSizeS: Int
-
The default capabilities for RTMPConneciton.
Declaration
Swift
public static let defaultCapabilities: Int
-
The default object encoding for RTMPConnection class.
Declaration
Swift
public static let defaultObjectEncoding: RTMPObjectEncoding
-
- NetStatusEvent#info.code for NetConnection
Declaration
Swift
public enum Code : String
-
Specifies the URL of .swf.
Declaration
Swift
public var swfUrl: String?
-
Specifies the URL of an HTTP referer.
Declaration
Swift
public var pageUrl: String?
-
Specifies the time to wait for TCP/IP Handshake done.
Declaration
Swift
public var timeout: Int
-
Specifies the dispatchQos for socket.
Declaration
Swift
public var qualityOfService: DispatchQoS
-
Specifies the name of application.
Declaration
Swift
public var flashVer: String
-
Specifies theoutgoing RTMPChunkSize.
Declaration
Swift
public var chunkSize: Int
-
Specifies the URI passed to the Self.connect() method.
Declaration
Swift
public private(set) var uri: URL? { get }
-
Specifies the instance connected to server(true) or not(false).
Declaration
Swift
public private(set) var connected: Bool { get }
-
Specifies the socket optional parameters.
Declaration
Swift
public var parameters: Any?
-
Specifies the object encoding for this RTMPConnection instance.
Declaration
Swift
public var objectEncoding: RTMPObjectEncoding
-
The statistics of total incoming bytes.
Declaration
Swift
public var totalBytesIn: Int64 { get }
-
The statistics of total outgoing bytes.
Declaration
Swift
public var totalBytesOut: Int64 { get }
-
The statistics of total RTMPStream counts.
Declaration
Swift
public var totalStreamsCount: Int { get }
-
Specifies the delegate of the RTMPConnection.
Declaration
Swift
public weak var delegate: (any RTMPConnectionDelegate)?
-
The statistics of outgoing queue bytes per second.
Declaration
Swift
@objc open private(set) dynamic var previousQueueBytesOut: [Int64] { get }
-
The statistics of incoming bytes per second.
Declaration
Swift
@objc open private(set) dynamic var currentBytesInPerSecond: Int32 { get }
-
The statistics of outgoing bytes per second.
Declaration
Swift
@objc open private(set) dynamic var currentBytesOutPerSecond: Int32 { get }
-
Creates a new connection.
Declaration
Swift
public init()
-
Calls a command or method on RTMP Server.
Declaration
Swift
public func call(_ commandName: String, responder: RTMPResponder?, arguments: Any?...)
-
Creates a two-way connection to an application on RTMP Server.
Declaration
Swift
public func connect(_ command: String, arguments: Any?...)
-
Closes the connection from the server.
Declaration
Swift
public func close()
-
Declaration
Swift
public func addEventListener(_ type: Event.Name, selector: Selector, observer: AnyObject? = nil, useCapture: Bool = false)
-
Declaration
Swift
public func removeEventListener(_ type: Event.Name, selector: Selector, observer: AnyObject? = nil, useCapture: Bool = false)
-
Declaration
Swift
public func dispatch(event: Event)
-
Declaration
Swift
public func dispatch(_ type: Event.Name, bubbles: Bool, data: Any?)