Video
public enum Video
extension Video: CustomStringConvertible
extension Video: RawRepresentable
extension Video: MediaSubtype
extension Video: Hashable
Represents the video media type. See the
official documentation for details.
You typically use Video as a MediaType.
let video = Video.mp4()
let mediaType = MediaType.video(video) // Creates: video/mp4
You can use standard switch statement to access video values.
func isSupported(video: Video) -> Bool {
switch video {
case .mp4, .H264: return true
default: return false
}
}
isSupported(audio: .mp4()) // Returns: true
isSupported(audio: .H264()) // Returns: true
isSupported(audio: .vc1()) // Returns: false
See also
MediaType
-
Represents the
1d-interleaved-parityfecsubtype.Declaration
Swift
case _1dInterleavedParityfec(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
3gppsubtype.Declaration
Swift
case _3gpp(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
3gpp2subtype.Declaration
Swift
case _3gpp2(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
3gpp-ttsubtype.Declaration
Swift
case _3gppTt(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
AV1subtype.Declaration
Swift
case AV1(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
BMPEGsubtype.Declaration
Swift
case BMPEG(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
BT656subtype.Declaration
Swift
case BT656(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
CelBsubtype.Declaration
Swift
case CelB(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
DVsubtype.Declaration
Swift
case DV(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
encaprtpsubtype.Declaration
Swift
case encaprtp(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
examplesubtype.Declaration
Swift
case example(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
FFV1subtype.Declaration
Swift
case FFV1(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
flexfecsubtype.Declaration
Swift
case flexfec(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
H261subtype.Declaration
Swift
case H261(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
H263subtype.Declaration
Swift
case H263(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
H263-1998subtype.Declaration
Swift
case H2631998(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
H263-2000subtype.Declaration
Swift
case H2632000(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
H264subtype.Declaration
Swift
case H264(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
H264-RCDOsubtype.Declaration
Swift
case H264RCDO(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
H264-SVCsubtype.Declaration
Swift
case H264SVC(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
H265subtype.Declaration
Swift
case H265(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
JPEGsubtype.Declaration
Swift
case JPEG(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
jpeg2000subtype.Declaration
Swift
case jpeg2000(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
jxsvsubtype.Declaration
Swift
case jxsv(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
mj2subtype.Declaration
Swift
case mj2(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
MP1Ssubtype.Declaration
Swift
case MP1S(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
MP2Psubtype.Declaration
Swift
case MP2P(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
MP2Tsubtype.Declaration
Swift
case MP2T(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
mp4subtype.Declaration
Swift
case mp4(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
MP4V-ESsubtype.Declaration
Swift
case MP4VES(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
MPVsubtype.Declaration
Swift
case MPV(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
mpegsubtype.Declaration
Swift
case mpeg(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
mpeg4-genericsubtype.Declaration
Swift
case mpeg4Generic(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
nvsubtype.Declaration
Swift
case nv(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
oggsubtype.Declaration
Swift
case ogg(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
parityfecsubtype.Declaration
Swift
case parityfec(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
pointersubtype.Declaration
Swift
case pointer(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
quicktimesubtype.Declaration
Swift
case quicktime(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
raptorfecsubtype.Declaration
Swift
case raptorfec(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
rawsubtype.Declaration
Swift
case raw(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
rtp-enc-aescm128subtype.Declaration
Swift
case rtpEncAescm128(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
rtploopbacksubtype.Declaration
Swift
case rtploopback(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
rtxsubtype.Declaration
Swift
case rtx(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
scipsubtype.Declaration
Swift
case scip(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
smpte291subtype.Declaration
Swift
case smpte291(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
SMPTE292Msubtype.Declaration
Swift
case SMPTE292M(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
ulpfecsubtype.Declaration
Swift
case ulpfec(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
vc1subtype.Declaration
Swift
case vc1(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
vc2subtype.Declaration
Swift
case vc2(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
VP8subtype.Declaration
Swift
case VP8(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
VP9subtype.Declaration
Swift
case VP9(_: Suffix? = nil, _: Parameters? = nil) -
Represents a subtype that does not fit in the other cases or is currently not officially defined.
You can use this case to define an arbitrary, unregistered subtype with the given name or to represent a subtype in the non standard tree, e.g. vendor tree or personal tree.
Optionally, you can specify a
SuffixandParameters.Declaration
Swift
case other(String, _: Suffix? = nil, _: Parameters? = nil) -
Declaration
Swift
case anything(_: Suffix? = nil, _: Parameters? = nil) -
Declaration
Swift
public var description: String { get } -
Declaration
Swift
public init(rawValue: String) -
Declaration
Swift
public var rawValue: String { get } -
Declaration
Swift
public var type: MediaType { get } -
Declaration
Swift
public static func == (lhs: `Self`, rhs: `Self`) -> Bool -
Declaration
Swift
public func hash(into hasher: inout Hasher)