diff --git a/Examples/iOS/NetStreamSwitcher.swift b/Examples/iOS/NetStreamSwitcher.swift index 6222d4cb3..0e7c7fb11 100644 --- a/Examples/iOS/NetStreamSwitcher.swift +++ b/Examples/iOS/NetStreamSwitcher.swift @@ -8,7 +8,6 @@ final class NetStreamSwitcher { enum Mode { case rtmp case srt - case http func makeStream(_ swithcer: NetStreamSwitcher) -> NetStream { switch self { @@ -20,20 +19,12 @@ final class NetStreamSwitcher { let connection = SRTConnection() swithcer.connection = connection return SRTStream(connection: connection) - case .http: - let service = HLSService(domain: "localhost", type: "_http._tcp", name: "HaishinKit", port: 8080) - swithcer.connection = service - return HTTPStream() } } } var uri = "" { didSet { - if uri.contains("http://") { - mode = .http - return - } if uri.contains("srt://") { mode = .srt return @@ -65,12 +56,6 @@ final class NetStreamSwitcher { } connection.open(URL(string: uri)) stream.publish("") - case .http: - guard let connection = connection as? HLSService, let stream = stream as? HTTPStream else { - return - } - connection.addHTTPStream(stream) - connection.startRunning() } } @@ -86,8 +71,6 @@ final class NetStreamSwitcher { case .srt: (stream as? SRTStream)?.close() (connection as? SRTConnection)?.close() - case .http: - break } } diff --git a/Examples/iOSSwiftUI/Model/ViewModel.swift b/Examples/iOSSwiftUI/Model/ViewModel.swift index a19c6d564..b76d9cd45 100644 --- a/Examples/iOSSwiftUI/Model/ViewModel.swift +++ b/Examples/iOSSwiftUI/Model/ViewModel.swift @@ -192,7 +192,7 @@ final class ViewModel: ObservableObject { } func changeVideoRate(level: CGFloat) { - rtmpStream.videoSettings.bitRate = UInt32(level * 1000) + rtmpStream.videoSettings.bitRate = Int(level * 1000) } func changeAudioRate(level: CGFloat) { diff --git a/Examples/macOS/Base.lproj/Main.storyboard b/Examples/macOS/Base.lproj/Main.storyboard index b06abb588..e71f04d31 100644 --- a/Examples/macOS/Base.lproj/Main.storyboard +++ b/Examples/macOS/Base.lproj/Main.storyboard @@ -79,7 +79,7 @@ - + @@ -87,7 +87,6 @@ - @@ -223,13 +222,13 @@ - + - + - + @@ -280,7 +279,7 @@