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-parityfec
subtype.Declaration
Swift
case _1dInterleavedParityfec(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
3gpp
subtype.Declaration
Swift
case _3gpp(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
3gpp2
subtype.Declaration
Swift
case _3gpp2(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
3gpp-tt
subtype.Declaration
Swift
case _3gppTt(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
AV1
subtype.Declaration
Swift
case AV1(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
BMPEG
subtype.Declaration
Swift
case BMPEG(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
BT656
subtype.Declaration
Swift
case BT656(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
CelB
subtype.Declaration
Swift
case CelB(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
DV
subtype.Declaration
Swift
case DV(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
encaprtp
subtype.Declaration
Swift
case encaprtp(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
example
subtype.Declaration
Swift
case example(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
FFV1
subtype.Declaration
Swift
case FFV1(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
flexfec
subtype.Declaration
Swift
case flexfec(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
H261
subtype.Declaration
Swift
case H261(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
H263
subtype.Declaration
Swift
case H263(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
H263-1998
subtype.Declaration
Swift
case H2631998(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
H263-2000
subtype.Declaration
Swift
case H2632000(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
H264
subtype.Declaration
Swift
case H264(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
H264-RCDO
subtype.Declaration
Swift
case H264RCDO(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
H264-SVC
subtype.Declaration
Swift
case H264SVC(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
H265
subtype.Declaration
Swift
case H265(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
JPEG
subtype.Declaration
Swift
case JPEG(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
jpeg2000
subtype.Declaration
Swift
case jpeg2000(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
jxsv
subtype.Declaration
Swift
case jxsv(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
mj2
subtype.Declaration
Swift
case mj2(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
MP1S
subtype.Declaration
Swift
case MP1S(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
MP2P
subtype.Declaration
Swift
case MP2P(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
MP2T
subtype.Declaration
Swift
case MP2T(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
mp4
subtype.Declaration
Swift
case mp4(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
MP4V-ES
subtype.Declaration
Swift
case MP4VES(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
MPV
subtype.Declaration
Swift
case MPV(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
mpeg
subtype.Declaration
Swift
case mpeg(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
mpeg4-generic
subtype.Declaration
Swift
case mpeg4Generic(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
nv
subtype.Declaration
Swift
case nv(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
ogg
subtype.Declaration
Swift
case ogg(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
parityfec
subtype.Declaration
Swift
case parityfec(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
pointer
subtype.Declaration
Swift
case pointer(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
quicktime
subtype.Declaration
Swift
case quicktime(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
raptorfec
subtype.Declaration
Swift
case raptorfec(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
raw
subtype.Declaration
Swift
case raw(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
rtp-enc-aescm128
subtype.Declaration
Swift
case rtpEncAescm128(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
rtploopback
subtype.Declaration
Swift
case rtploopback(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
rtx
subtype.Declaration
Swift
case rtx(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
scip
subtype.Declaration
Swift
case scip(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
smpte291
subtype.Declaration
Swift
case smpte291(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
SMPTE292M
subtype.Declaration
Swift
case SMPTE292M(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
ulpfec
subtype.Declaration
Swift
case ulpfec(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
vc1
subtype.Declaration
Swift
case vc1(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
vc2
subtype.Declaration
Swift
case vc2(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
VP8
subtype.Declaration
Swift
case VP8(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
VP9
subtype.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
Suffix
andParameters
.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)