mirror of
https://github.com/HaishinKit/HaishinKit.swift.git
synced 2026-05-07 20:12:28 +00:00
35 lines
744 B
Swift
35 lines
744 B
Swift
/// Constans that defines the RTMPObject encoding type.
|
|
public enum RTMPObjectEncoding: UInt8, Sendable {
|
|
/// The AMF0 Encoding.
|
|
case amf0 = 0x00
|
|
/// The AMF3 Encoding.
|
|
case amf3 = 0x03
|
|
|
|
var dataType: RTMPMessageType {
|
|
switch self {
|
|
case .amf0:
|
|
return .amf0Data
|
|
case .amf3:
|
|
return .amf3Data
|
|
}
|
|
}
|
|
|
|
var sharedObjectType: RTMPMessageType {
|
|
switch self {
|
|
case .amf0:
|
|
return .amf0Shared
|
|
case .amf3:
|
|
return .amf3Shared
|
|
}
|
|
}
|
|
|
|
var commandType: RTMPMessageType {
|
|
switch self {
|
|
case .amf0:
|
|
return .amf0Command
|
|
case .amf3:
|
|
return .amf3Command
|
|
}
|
|
}
|
|
}
|