RTMPConnection
public actor RTMPConnection : NetworkConnection
The RTMPConneciton class create a two-way RTMP connection.
-
The error domain code.
See moreDeclaration
Swift
public enum Error : Swift.Error
-
The default time to wait for TCP/IP Handshake done.
Declaration
Swift
public static let defaultTimeout: Int
-
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
-
The default an rtmp request time out value (ms).
Declaration
Swift
public static let defaultRequestTimeout: UInt64
-
- NetStatusEvent#info.code for NetConnection
Declaration
Swift
public enum Code : String
-
The URL of .swf.
Declaration
Swift
public let swfUrl: String?
-
The URL of an HTTP referer.
Declaration
Swift
public let pageUrl: String?
-
The name of application.
Declaration
Swift
public let flashVer: String
-
The time to wait for TCP/IP Handshake done.
Declaration
Swift
public let timeout: Int
-
The RTMP request timeout value. Defaul value is 500 msec.
Declaration
Swift
public let requestTimeout: UInt64
-
The outgoing RTMPChunkSize.
Declaration
Swift
public let chunkSize: Int
-
The dispatchQos for socket.
Declaration
Swift
public let qualityOfService: DispatchQoS
-
The URI passed to the Self.connect() method.
Declaration
Swift
public private(set) var uri: URL? { get }
-
The instance connected to server(true) or not(false).
Declaration
Swift
@Published public private(set) var connected: Bool { get set }
-
The stream of events you receive RTMP status events from a service.
Declaration
Swift
public var status: AsyncStream<RTMPStatus> { get }
-
The object encoding for this RTMPConnection instance.
Declaration
Swift
public let objectEncoding: RTMPObjectEncoding
-
Creates a new connection.
Declaration
Swift
public init( swfUrl: String? = nil, pageUrl: String? = nil, flashVer: String = RTMPConnection.defaultFlashVer, timeout: Int = RTMPConnection.defaultTimeout, requestTimeout: UInt64 = RTMPConnection.defaultRequestTimeout, chunkSize: Int = RTMPConnection.defaultChunkSizeS, qualityOfService: DispatchQoS = .userInitiated)
-
call(_:
Asynchronousarguments: ) Calls a command or method on RTMP Server.
Declaration
Swift
public func call(_ commandName: String, arguments: (any Sendable)?...) async throws -> RTMPResponse
-
connect(_:
Asynchronousarguments: ) Creates a two-way connection to an application on RTMP Server.
Declaration
Swift
public func connect(_ command: String, arguments: (any Sendable)?...) async throws -> RTMPResponse
-
close()
AsynchronousCloses the connection from the server.
Declaration
Swift
public func close() async throws