Skip to content

Commit 8044c9c

Browse files
committed
refs #1840
1 parent 31e3bf5 commit 8044c9c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

SRTHaishinKit/Sources/SRT/SRTStream.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ public actor SRTStream {
99
static let supportedAudioCodecs: [AudioCodecSettings.Format] = [.aac]
1010
static let supportedVideoCodecs: [VideoCodecSettings.Format] = VideoCodecSettings.Format.allCases
1111

12+
/// The expected medias for transport stream.
13+
public var expectedMedias: Set<AVMediaType> {
14+
writer.expectedMedias
15+
}
16+
1217
@Published public private(set) var readyState: StreamReadyState = .idle
1318
public private(set) var videoTrackId: UInt8? = UInt8.max
1419
public private(set) var audioTrackId: UInt8? = UInt8.max
@@ -127,8 +132,8 @@ public actor SRTStream {
127132
///
128133
/// This sets whether the stream contains audio only, video only, or both. Normally, this is automatically set through the append method.
129134
/// If you cannot call the append method before publishing, please use this method to explicitly specify the contents of the stream.
130-
public func setExpectedMedia(_ expectedMedia: Set<AVMediaType>) {
131-
writer.expectedMedias = expectedMedia
135+
public func setExpectedMedias(_ expectedMedias: Set<AVMediaType>) {
136+
writer.expectedMedias = expectedMedias
132137
}
133138

134139
func doInput(_ data: Data) {

0 commit comments

Comments
 (0)