Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove RTMPSocket.swift #1406

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions HaishinKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
29B876B11CD70B2800FC07DA /* RTMPMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B876A51CD70B2800FC07DA /* RTMPMessage.swift */; };
29B876B21CD70B2800FC07DA /* RTMPMuxer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B876A61CD70B2800FC07DA /* RTMPMuxer.swift */; };
29B876B41CD70B2800FC07DA /* RTMPSharedObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B876A81CD70B2800FC07DA /* RTMPSharedObject.swift */; };
29B876B51CD70B2800FC07DA /* RTMPSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B876A91CD70B2800FC07DA /* RTMPSocket.swift */; };
29B876B61CD70B2800FC07DA /* RTMPStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B876AA1CD70B2800FC07DA /* RTMPStream.swift */; };
29B876BC1CD70B3900FC07DA /* ByteArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B876B81CD70B3900FC07DA /* ByteArray.swift */; };
29B876BD1CD70B3900FC07DA /* CRC32.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B876B91CD70B3900FC07DA /* CRC32.swift */; };
Expand Down Expand Up @@ -540,7 +539,6 @@
29B876A51CD70B2800FC07DA /* RTMPMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RTMPMessage.swift; sourceTree = "<group>"; };
29B876A61CD70B2800FC07DA /* RTMPMuxer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RTMPMuxer.swift; sourceTree = "<group>"; };
29B876A81CD70B2800FC07DA /* RTMPSharedObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RTMPSharedObject.swift; sourceTree = "<group>"; };
29B876A91CD70B2800FC07DA /* RTMPSocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RTMPSocket.swift; sourceTree = "<group>"; };
29B876AA1CD70B2800FC07DA /* RTMPStream.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RTMPStream.swift; sourceTree = "<group>"; };
29B876B81CD70B3900FC07DA /* ByteArray.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ByteArray.swift; sourceTree = "<group>"; };
29B876B91CD70B3900FC07DA /* CRC32.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CRC32.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1135,7 +1133,6 @@
29DF20612312A3DD004057C3 /* RTMPNWSocket.swift */,
293B42E82340B4840086F973 /* RTMPObjectEncoding.swift */,
29B876A81CD70B2800FC07DA /* RTMPSharedObject.swift */,
29B876A91CD70B2800FC07DA /* RTMPSocket.swift */,
29DF20652312A436004057C3 /* RTMPSocketCompatible.swift */,
29B876AA1CD70B2800FC07DA /* RTMPStream.swift */,
BC558267240BB40E00011AC0 /* RTMPStreamInfo.swift */,
Expand Down Expand Up @@ -1836,7 +1833,6 @@
29EA87E61E79A2780043A5F8 /* CMAudioFormatDescription+Extension.swift in Sources */,
BC7C56CD29A786AE00C41A9B /* ADTS.swift in Sources */,
BC562DCB29576D220048D89A /* AVCaptureSession.Preset+Extension.swift in Sources */,
29B876B51CD70B2800FC07DA /* RTMPSocket.swift in Sources */,
29B876AB1CD70B2800FC07DA /* AMF0Serializer.swift in Sources */,
29B8765B1CD70A7900FC07DA /* AudioCodec.swift in Sources */,
29EA87D51E799F670043A5F8 /* Mirror+Extension.swift in Sources */,
Expand Down
8 changes: 1 addition & 7 deletions Sources/RTMP/RTMPConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ public class RTMPConnection: EventDispatcher {
public private(set) var uri: URL?
/// Specifies the instance connected to server(true) or not(false).
public private(set) var connected = false
/// Specifies the instance requires Network.framework if possible.
public var requireNetworkFramework = true
/// Specifies the socket optional parameters.
public var parameters: Any?
/// Specifies the object encoding for this RTMPConnection instance.
Expand Down Expand Up @@ -294,11 +292,7 @@ public class RTMPConnection: EventDispatcher {
case "rtmpt", "rtmpts":
socket = socket is RTMPTSocket ? socket : RTMPTSocket()
default:
if #available(iOS 12.0, macOS 10.14, tvOS 12.0, *), requireNetworkFramework {
socket = socket is RTMPNWSocket ? socket : RTMPNWSocket()
} else {
socket = socket is RTMPSocket ? socket : RTMPSocket()
}
socket = socket is RTMPNWSocket ? socket : RTMPNWSocket()
}
socket.map {
$0.timeout = timeout
Expand Down
3 changes: 0 additions & 3 deletions Sources/RTMP/RTMPNWSocket.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import Foundation
#if canImport(Network)
import Network
#endif

@available(iOS 12.0, macOS 10.14, tvOS 12.0, *)
final class RTMPNWSocket: RTMPSocketCompatible {
static let defaultWindowSizeC = Int(UInt8.max)

Expand Down
106 changes: 0 additions & 106 deletions Sources/RTMP/RTMPSocket.swift

This file was deleted.