diff --git a/.github/renovate.json b/.github/renovate.json index 949faf64..1177058d 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -9,5 +9,6 @@ "group:recommended", "group:allNonMajor", "schedule:weekly" - ] -} \ No newline at end of file + ], + "dependencyDashboard": false +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e132f55..8255d97f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: XCODE: /Applications/Xcode_14.3.1.app XCODE_SDK: iphoneos16.4 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Select Xcode Version run: sudo xcode-select -s '${{ env.XCODE }}/Contents/Developer' - name: Show Xcode Version @@ -58,7 +58,7 @@ jobs: runs-on: macos-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Create Release id: create_release uses: actions/create-release@v1.1.4 diff --git a/.jazzy.yaml b/.jazzy.yaml index 856f1ea2..894b753e 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -8,7 +8,7 @@ theme: apple min_acl: public sdk: iphoneos module: Sora -module_version: 2023.2.0 +module_version: 2023.3.0 swift_version: 5.8.1 xcodebuild_arguments: - -parallelizeTargets diff --git a/CHANGES.md b/CHANGES.md index c4bc5257..7af99951 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,27 @@ ## develop +## 2023.3.0 + +- [CHANGE] `@available(*, unavailable)` は廃止になるため削除する + - Swift 5.9 以降 `@available(*, unavailable)` が禁止された + - Sora iOS SDK では廃止となったプロパティに対して `@available(*, unavailable)` を付与していたが、削除した + - @torikizi +- [CHANGE] `@available(*, deprecated, ... )` としていた非推奨項目を削除する + - 非推奨であった項目について削除に移行する + - 移行方法については https://sora-ios-sdk.shiguredo.jp/ の移行ドキュメントに記載されている + - @torikizi +- [CHANGE] 廃止された `onConnectHandler` を `onConnect` に置き換える + - すでに廃止済みの `onConnectHandler` が残っていたので、`onConnect` に置き換えた + - `PeerChannel.swift` と `SignalingChannel.swift` 以外はすでに `onConnect` に置き換えていた + - @torikizi +- [UPDATE] WebRTC 116.5845.6.1 に上げる + - @miosakuma +- [FIX] `MediaChannel` の `connectionCount`, `publisherCount`, `subscriberCount` に値が設定されない不具合を修正する + - Sora のシグナリングメッセージから channel_upstream_connections, channel_downstream_connections が廃止された契機で値が設定されなくなっていた + - Sora のシグナリングメッセージ、channel_sendrecv_connections, channel_sendonly_connections, channel_recvonly_connections, channel_connections を元に値を設定するよう修正 + - @miosakuma + ## 2023.2.0 - [UPDATE] システム条件を変更する @@ -31,7 +52,7 @@ - [ADD] サイマルキャストを VP9 / AV1 に対応する - @szktty -## 2023.2.0 +## 2023.1.0 - [UPDATE] WebRTC 112.5615.1.0 に上げる - @miosakuma diff --git a/Package.swift b/Package.swift index ef945ea9..85386c0b 100644 --- a/Package.swift +++ b/Package.swift @@ -3,7 +3,7 @@ import Foundation import PackageDescription -let file = "WebRTC-115.5790.7.0/WebRTC.xcframework.zip" +let file = "WebRTC-116.5845.6.1/WebRTC.xcframework.zip" let package = Package( name: "Sora", @@ -16,7 +16,7 @@ let package = Package( .binaryTarget( name: "WebRTC", url: "https://github.com/shiguredo/sora-ios-sdk-specs/releases/download/\(file)", - checksum: "1a852818dc15280f3ded5d16cc52fb30c91515c9f08b26d2dcaea68a7de414fc" + checksum: "5902e61f79e941830a52827db8bc408e7c9d2e5f2e0804e3664b8dd35fd6148c" ), .target( name: "Sora", diff --git a/Podfile b/Podfile index 4af7346e..52bafbe5 100644 --- a/Podfile +++ b/Podfile @@ -5,5 +5,5 @@ platform :ios, '13.0' target 'Sora' do use_frameworks! - pod 'WebRTC', '115.5790.7.0' + pod 'WebRTC', '116.5845.6.1' end diff --git a/Podfile.dev b/Podfile.dev index 7f9da9ac..018dc371 100644 --- a/Podfile.dev +++ b/Podfile.dev @@ -5,7 +5,7 @@ platform :ios, '13.0' target 'Sora' do use_frameworks! - pod 'WebRTC', '115.5790.7.0' + pod 'WebRTC', '116.5845.6.1' pod 'SwiftLint', '0.51.0' pod 'SwiftFormat/CLI', '0.51.6' end diff --git a/README.md b/README.md index 705a313a..1ca394f1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Sora iOS SDK -[![libwebrtc](https://img.shields.io/badge/libwebrtc-115.5790-blue.svg)](https://chromium.googlesource.com/external/webrtc/+/branch-heads/5790) +[![libwebrtc](https://img.shields.io/badge/libwebrtc-116.5845-blue.svg)](https://chromium.googlesource.com/external/webrtc/+/branch-heads/5845) [![GitHub tag](https://img.shields.io/github/tag/shiguredo/sora-ios-sdk.svg)](https://github.com/shiguredo/sora-ios-sdk) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) @@ -37,6 +37,18 @@ Xcode と Swift のバージョンによっては、 CocoaPods で取得でき [Sora iOS SDK ドキュメント — Sora iOS SDK](https://sora-ios-sdk.shiguredo.jp/) +## 有償での優先実装が可能な機能一覧 + +**詳細は Discord またはメールにてお問い合わせください** + +- オープンソースでの公開が前提 +- 可能であれば企業名の公開 + - 公開が難しい場合は `企業名非公開` と書かせていただきます + +### 機能 + +- 音声出力先変更機能 + ## ライセンス Apache License 2.0 diff --git a/Sora.podspec b/Sora.podspec index 27725513..d0585d4f 100644 --- a/Sora.podspec +++ b/Sora.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Sora" - s.version = "2023.2.0" + s.version = "2023.3.0" s.summary = "Sora iOS SDK" s.description = <<-DESC A library to develop Sora client applications. @@ -15,7 +15,7 @@ Pod::Spec.new do |s| } s.source_files = "Sora/**/*.swift" s.resources = ['Sora/*.xib'] - s.dependency "WebRTC", '115.5790.7.0' + s.dependency "WebRTC", '116.5845.6.1' s.pod_target_xcconfig = { 'ARCHS' => 'arm64', 'ARCHS[config=Debug]' => '$(ARCHS_STANDARD)' diff --git a/Sora.xcodeproj/project.pbxproj b/Sora.xcodeproj/project.pbxproj index c4b31ec9..ed95dbb1 100644 --- a/Sora.xcodeproj/project.pbxproj +++ b/Sora.xcodeproj/project.pbxproj @@ -33,7 +33,6 @@ 9174A8951F73F90B00D586C4 /* AudioCodec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9174A8941F73F90B00D586C4 /* AudioCodec.swift */; }; 9174A8971F73F93B00D586C4 /* ICETransportPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9174A8961F73F93B00D586C4 /* ICETransportPolicy.swift */; }; 9174A8991F73F9A200D586C4 /* TLSSecurityPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9174A8981F73F9A200D586C4 /* TLSSecurityPolicy.swift */; }; - 9174A89B1F73F9EE00D586C4 /* CameraPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9174A89A1F73F9EE00D586C4 /* CameraPosition.swift */; }; 91756E211F90A87500B70C53 /* ConnectionState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91756E201F90A87500B70C53 /* ConnectionState.swift */; }; 91756E221F90ADE900B70C53 /* PeerChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A19B8B1F19366B00A76852 /* PeerChannel.swift */; }; 9177FF9C1F2E2D1600B4FA1A /* VideoCapturer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9177FF9B1F2E2D1600B4FA1A /* VideoCapturer.swift */; }; @@ -49,7 +48,6 @@ 91FA6F211D93CA9800D38DB4 /* VideoFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91FA6F201D93CA9800D38DB4 /* VideoFrame.swift */; }; 91FD95751DCA06F700047BA9 /* RTC+Description.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91FD95741DCA06F700047BA9 /* RTC+Description.swift */; }; AD7227122716B5F100001A23 /* DataChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD7227112716B5F100001A23 /* DataChannel.swift */; }; - C5D3C7421F7CEB18004660F5 /* VideoCapturerDevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5D3C7411F7CEB18004660F5 /* VideoCapturerDevice.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -101,7 +99,6 @@ 9174A8941F73F90B00D586C4 /* AudioCodec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioCodec.swift; sourceTree = ""; }; 9174A8961F73F93B00D586C4 /* ICETransportPolicy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICETransportPolicy.swift; sourceTree = ""; }; 9174A8981F73F9A200D586C4 /* TLSSecurityPolicy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TLSSecurityPolicy.swift; sourceTree = ""; }; - 9174A89A1F73F9EE00D586C4 /* CameraPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CameraPosition.swift; sourceTree = ""; }; 91756E201F90A87500B70C53 /* ConnectionState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionState.swift; sourceTree = ""; }; 9177FF9B1F2E2D1600B4FA1A /* VideoCapturer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoCapturer.swift; sourceTree = ""; }; 918A38F71F30F49500D047BA /* ICEServerInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ICEServerInfo.swift; sourceTree = ""; }; @@ -120,7 +117,6 @@ 91FA6F201D93CA9800D38DB4 /* VideoFrame.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoFrame.swift; sourceTree = ""; }; 91FD95741DCA06F700047BA9 /* RTC+Description.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "RTC+Description.swift"; sourceTree = ""; }; AD7227112716B5F100001A23 /* DataChannel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataChannel.swift; sourceTree = ""; }; - C5D3C7411F7CEB18004660F5 /* VideoCapturerDevice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoCapturerDevice.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -185,7 +181,6 @@ 9174A88E1F7395CA00D586C4 /* AspectRatio.swift */, 9174A8941F73F90B00D586C4 /* AudioCodec.swift */, 910444CE253EC6F400EA06BE /* AudioMode.swift */, - 9174A89A1F73F9EE00D586C4 /* CameraPosition.swift */, 915CEC8F1F821A90006E45E2 /* CameraVideoCapturer.swift */, 9173595D1F2CCEBF00806F8B /* Configuration.swift */, 91756E201F90A87500B70C53 /* ConnectionState.swift */, @@ -212,7 +207,6 @@ 3591D8EF27032233000AD514 /* SoraDispatcher.swift */, 9145A58F1F0CB093002D6EC6 /* Utilities.swift */, 9177FF9B1F2E2D1600B4FA1A /* VideoCapturer.swift */, - C5D3C7411F7CEB18004660F5 /* VideoCapturerDevice.swift */, 9174A8921F73F8CF00D586C4 /* VideoCodec.swift */, 91FA6F201D93CA9800D38DB4 /* VideoFrame.swift */, 91B1D6451D75E11F00112A4E /* VideoRenderer.swift */, @@ -397,7 +391,6 @@ 91A19B8E1F19367700A76852 /* MediaChannel.swift in Sources */, 915CEC901F821A90006E45E2 /* CameraVideoCapturer.swift in Sources */, 91672C791F78F7FC002300E7 /* WebRTCConfigration.swift in Sources */, - 9174A89B1F73F9EE00D586C4 /* CameraPosition.swift in Sources */, 916134DD1F7B5EFF00ABDDAF /* AspectRatio.swift in Sources */, 9174A8951F73F90B00D586C4 /* AudioCodec.swift in Sources */, 91A19B8A1F19366000A76852 /* SignalingChannel.swift in Sources */, @@ -428,7 +421,6 @@ 9174A8991F73F9A200D586C4 /* TLSSecurityPolicy.swift in Sources */, 9128A4A91F2A6CB100AC6B1E /* MediaStream.swift in Sources */, 9141AB641F4204C0007C4D1C /* ConnectionTimer.swift in Sources */, - C5D3C7421F7CEB18004660F5 /* VideoCapturerDevice.swift in Sources */, 916B0B992553D9620035B5F9 /* AudioMode.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -594,7 +586,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 2023.2.0; + MARKETING_VERSION = 2023.3.0; PRODUCT_BUNDLE_IDENTIFIER = jp.shiguredo.sora.ios.sdk.Sora; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; @@ -628,7 +620,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 2023.2.0; + MARKETING_VERSION = 2023.3.0; PRODUCT_BUNDLE_IDENTIFIER = jp.shiguredo.sora.ios.sdk.Sora; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; diff --git a/Sora/CameraPosition.swift b/Sora/CameraPosition.swift deleted file mode 100644 index 571f0b23..00000000 --- a/Sora/CameraPosition.swift +++ /dev/null @@ -1,28 +0,0 @@ -import Foundation - -/** - カメラの位置を表します。 - 廃止されました。 - */ -@available(*, deprecated, message: "CameraPosition は廃止されました。") -public enum CameraPosition { - /// 前面 - case front - - /// 背面 - case back - - /** - カメラの位置の前面と背面を反転します。 - - - returns: 反転後のカメラ位置 - */ - public func flip() -> CameraPosition { - switch self { - case .front: - return .back - case .back: - return .front - } - } -} diff --git a/Sora/CameraVideoCapturer.swift b/Sora/CameraVideoCapturer.swift index 6ff2b791..9a124a34 100644 --- a/Sora/CameraVideoCapturer.swift +++ b/Sora/CameraVideoCapturer.swift @@ -141,13 +141,6 @@ public final class CameraVideoCapturer { device.position } - /// 使用中のカメラの位置に対応するデバイス - /// captureDevice に変更されました - @available(*, deprecated, renamed: "captureDevice") - public var currentCameraDevice: AVCaptureDevice? { - device - } - /// 使用中のデバイス public var device: AVCaptureDevice @@ -315,51 +308,6 @@ public final class CameraVideoCapturer { } } } - - // MARK: - 廃止された API - - /// シングルトンインスタンス - /// shared は廃止されました。 - @available(*, unavailable, message: "shared は廃止されました。") - public static var shared: CameraVideoCapturer? - - /// 利用可能なデバイスのリスト - /// 名称が devices に変更されました - @available(*, unavailable, renamed: "devices") - public static var captureDevices: [AVCaptureDevice] { RTCCameraVideoCapturer.captureDevices() } - - /// 指定したカメラ位置にマッチした最初のデバイスを返します。 - /// 名称が device に変更されました - @available(*, unavailable, renamed: "device") - public static func captureDevice(for position: AVCaptureDevice.Position) -> AVCaptureDevice? { - nil - } - - /// `true` であれば接続解除時にカメラを停止します。 - /// 廃止されました。 - @available(*, unavailable, message: "廃止されました") - public var canStop: Bool = false - - /// :nodoc: - @available(*, unavailable, message: "suitableFrameRate は廃止されました。 maxFramerate を利用してください。") - public static func suitableFrameRate(for format: AVCaptureDevice.Format, frameRate: Int) -> Int? { - nil - } - - /// カメラの設定 - /// 廃止されました - @available(*, unavailable, message: "settings は廃止されました。") - public private(set) var settings: Any? - - /// `true` であれば接続解除時にカメラを停止します。 - @available(*, unavailable, message: "stopWhenDone は廃止されました。") - public private(set) var stopWhenDone: Bool = false - - /// :nodoc: - @available(*, unavailable, message: "suitableFormat は廃止されました。 format を利用してください。") - public static func suitableFormat(for device: AVCaptureDevice, resolution: Any) -> AVCaptureDevice.Format? { - nil - } } /** diff --git a/Sora/Configuration.swift b/Sora/Configuration.swift index baa4c002..017fe03d 100644 --- a/Sora/Configuration.swift +++ b/Sora/Configuration.swift @@ -71,10 +71,6 @@ public struct Configuration { case disabled } - /// サーバーの URL - @available(*, unavailable, message: "url は廃止されました。 urlCandidates を利用してください。") - public var url: Any? - /// シグナリングに利用する URL の候補 public var urlCandidates: [URL] @@ -95,8 +91,6 @@ public struct Configuration { /// :nodoc: var isMultistream: Bool { switch role { - case .group, .groupSub: - return true default: return multistreamEnabled } @@ -105,7 +99,7 @@ public struct Configuration { /// :nodoc: var isSender: Bool { switch role { - case .publisher, .group, .sendonly, .sendrecv: + case .sendonly, .sendrecv: return true default: return false @@ -124,11 +118,6 @@ public struct Configuration { /// 映像ビットレート。デフォルトは無指定です。 public var videoBitRate: Int? - /// 映像キャプチャーの種別。 - /// 廃止されました。 - @available(*, unavailable, message: "videoCapturerDevice は廃止されました。") - public var videoCapturerDevice: VideoCapturerDevice? - /// カメラの設定 public var cameraSettings = CameraSettings.default @@ -157,30 +146,6 @@ public struct Configuration { /// 詳しくは Sora のスポットライト機能を参照してください。 public var spotlightEnabled: Spotlight = .disabled - /// スポットライトの対象人数 - @available(*, deprecated, renamed: "spotlightNumber", - message: "このプロパティは spotlightNumber に置き換えられました。") - public var spotlight: Int? { - get { - spotlightNumber - } - set { - spotlightNumber = newValue - } - } - - /// スポットライトの対象人数 - @available(*, deprecated, renamed: "spotlightNumber", - message: "このプロパティは spotlightNumber に置き換えられました。") - public var activeSpeakerLimit: Int? { - get { - spotlightNumber - } - set { - spotlightNumber = newValue - } - } - /// スポットライトの対象人数 public var spotlightNumber: Int? @@ -233,44 +198,9 @@ public struct Configuration { /// WebSocket チャネルに関するイベントハンドラ public var webSocketChannelHandlers = WebSocketChannelHandlers() - /// シグナリングチャネルに関するイベントハンドラ - @available(*, unavailable, message: "廃止されました。 mediaChannelHandlers を利用してください。") - public var signalingChannelHandlers = SignalingChannelHandlers() - - /// ピアチャネルに関するイベントハンドラ - @available(*, unavailable, message: "廃止されました。 mediaChannelHandlers を利用してください。") - public var peerChannelHandlers = PeerChannelHandlers() - /// メディアチャネルに関するイベントハンドラ public var mediaChannelHandlers = MediaChannelHandlers() - // MARK: - 接続チャネルに関する設定 - - /** - 生成されるシグナリングチャネルの型。 - 何も指定しなければデフォルトのシグナリングチャネルが生成されます。 - */ - @available(*, unavailable, message: "signalingChannelType は廃止されました。") - public var signalingChannelType: Any? - - /** - 生成される WebSocket チャネルの型。 - 何も指定しなければデフォルトの WebSocket チャネルが生成されます。 - */ - @available(*, unavailable, message: "webSocketChannelType は廃止されました。") - public var webSocketChannelType: WebSocketChannel.Type? - - /** - 生成されるピアチャネルの型。 - 何も指定しなければデフォルトのピアチャネルが生成されます。 - */ - @available(*, unavailable, message: "peerChannelType は廃止されました。") - public var peerChannelType: Any? - - /// :nodoc: - @available(*, unavailable, message: "allowsURLSessionWebSocketChannel は廃止されました。") - public var allowsURLSessionWebSocketChannel: Bool = true - // MARK: パブリッシャーに関する設定 /// パブリッシャーのストリームの ID です。 @@ -285,30 +215,6 @@ public struct Configuration { /// 通常、指定する必要はありません。 public var publisherAudioTrackId: String = defaultPublisherAudioTrackId - // MARK: - インスタンスの生成 - - /** - このイニシャライザーは ``init(url:channelId:role:multistreamEnabled:)`` に置き換えられました。 - 以降はマルチストリームの可否を明示的に指定してください。 - このイニシャライザーはマルチストリームを無効にして初期化します。 - - - parameter url: サーバーの URL - - parameter channelId: チャネル ID - - parameter role: ロール - */ - /// - @available(*, deprecated, renamed: "init(url:channelId:role:multistreamEnabled:)", - message: "このイニシャライザーは init(url:channelId:role:multistreamEnabled:) に置き換えられました。") - public init(url: URL, - channelId: String, - role: Role) - { - urlCandidates = [url] - self.channelId = channelId - self.role = role - multistreamEnabled = false - } - /** 初期化します。 diff --git a/Sora/DeviceInfo.swift b/Sora/DeviceInfo.swift index 2bcdda80..ed3e0f2f 100644 --- a/Sora/DeviceInfo.swift +++ b/Sora/DeviceInfo.swift @@ -25,8 +25,6 @@ public struct DeviceInfo { public static var current: DeviceInfo = .init(device: UIDevice.current, machineName: currentMachineName()) - @available(*, unavailable, message: "model は廃止されました。") - public let model: String = "" public let machineName: String public var description: String { diff --git a/Sora/MediaChannel.swift b/Sora/MediaChannel.swift index 66f76dcb..8245c22c 100644 --- a/Sora/MediaChannel.swift +++ b/Sora/MediaChannel.swift @@ -3,46 +3,6 @@ import WebRTC /// メディアチャネルのイベントハンドラです。 public final class MediaChannelHandlers { - /// このプロパティは onConnect に置き換えられました。 - @available(*, deprecated, renamed: "onConnect", - message: "このプロパティは onConnect に置き換えられました。") - public var onConnectHandler: ((Error?) -> Void)? { - get { onConnect } - set { onConnect = newValue } - } - - /// このプロパティは onDisconnect に置き換えられました。 - @available(*, deprecated, renamed: "onDisconnect", - message: "このプロパティは onDisconnect に置き換えられました。") - public var onDisconnectHandler: ((Error?) -> Void)? { - get { onDisconnect } - set { onDisconnect = newValue } - } - - /// このプロパティは onAddStream に置き換えられました。 - @available(*, deprecated, renamed: "onAddStream", - message: "このプロパティは onAddStream に置き換えられました。") - public var onAddStreamHandler: ((MediaStream) -> Void)? { - get { onAddStream } - set { onAddStream = newValue } - } - - /// このプロパティは onRemoveStream に置き換えられました。 - @available(*, deprecated, renamed: "onRemoveStream", - message: "このプロパティは onRemoveStream に置き換えられました。") - public var onRemoveStreamHandler: ((MediaStream) -> Void)? { - get { onRemoveStream } - set { onRemoveStream = newValue } - } - - /// このプロパティは onReceiveSignaling に置き換えられました。 - @available(*, deprecated, renamed: "onReceiveSignaling", - message: "このプロパティは onReceiveSignaling に置き換えられました。") - public var onReceiveSignalingHandler: ((Signaling) -> Void)? { - get { onReceiveSignaling } - set { onReceiveSignaling = newValue } - } - /// 接続成功時に呼ばれるクロージャー public var onConnect: ((Error?) -> Void)? @@ -172,14 +132,7 @@ public final class MediaChannel { /// 同チャネルに接続中のクライアントの数。 /// サーバーから通知を受信可能であり、かつ接続中にのみ取得可能です。 - public var connectionCount: Int? { - switch (publisherCount, subscriberCount) { - case let (.some(pub), .some(sub)): - return pub + sub - default: - return nil - } - } + public private(set) var connectionCount: Int? /// 同チャネルに接続中のクライアントのうち、パブリッシャーの数。 /// サーバーから通知を受信可能であり、接続中にのみ取得可能です。 @@ -194,10 +147,6 @@ public final class MediaChannel { /// シグナリングチャネル let signalingChannel: SignalingChannel - /// ウェブソケットチャンネル - @available(*, unavailable, message: "webSocketChannel は廃止されました。") - public var webSocketChannel: Any? - /// ピアチャネル var peerChannel: PeerChannel { _peerChannel! @@ -365,8 +314,17 @@ public final class MediaChannel { Logger.debug(type: .mediaChannel, message: "receive signaling") switch message { case let .notify(message): - weakSelf.publisherCount = message.publisherCount - weakSelf.subscriberCount = message.subscriberCount + // connectionCount, channelRecvonlyConnections, channelSendonlyConnections, channelSendrecvConnections + // 全てに値が入っていた時のみプロパティを更新する + if let connectionCount = message.connectionCount, + let sendonlyConnections = message.channelSendonlyConnections, + let recvonlyConnections = message.channelRecvonlyConnections, + let sendrecvConnections = message.channelSendrecvConnections + { + weakSelf.publisherCount = sendonlyConnections + sendrecvConnections + weakSelf.subscriberCount = recvonlyConnections + sendrecvConnections + weakSelf.connectionCount = connectionCount + } else {} default: break } diff --git a/Sora/MediaStream.swift b/Sora/MediaStream.swift index 4ac0d1a2..4d3a5388 100644 --- a/Sora/MediaStream.swift +++ b/Sora/MediaStream.swift @@ -14,22 +14,6 @@ public enum MediaStreamAudioVolume { /// ストリームのイベントハンドラです。 public final class MediaStreamHandlers { - /// このプロパティは onSwitchVideo に置き換えられました。 - @available(*, deprecated, renamed: "onSwitchVideo", - message: "このプロパティは onSwitchVideo に置き換えられました。") - public var onSwitchVideoHandler: ((_ isEnabled: Bool) -> Void)? { - get { onSwitchVideo } - set { onSwitchVideo = newValue } - } - - /// このプロパティは onSwitchAudio に置き換えられました。 - @available(*, deprecated, renamed: "onSwitchAudio", - message: "このプロパティは onSwitchAudio に置き換えられました。") - public var onSwitchAudioHandler: ((_ isEnabled: Bool) -> Void)? { - get { onSwitchAudio } - set { onSwitchAudio = newValue } - } - /// 映像トラックが有効または無効にセットされたときに呼ばれるクロージャー public var onSwitchVideo: ((_ isEnabled: Bool) -> Void)? diff --git a/Sora/PackageInfo.swift b/Sora/PackageInfo.swift index 61b35db2..cae431b8 100644 --- a/Sora/PackageInfo.swift +++ b/Sora/PackageInfo.swift @@ -1,7 +1,7 @@ /// :nodoc: public enum SDKInfo { // Sora iOS SDK のバージョンを定義する - public static let version = "2023.2.0" + public static let version = "2023.3.0" } /** @@ -9,16 +9,16 @@ public enum SDKInfo { */ public enum WebRTCInfo { /// WebRTC フレームワークのバージョン - public static let version = "M115" + public static let version = "M116" /// WebRTC フレームワークのコミットポジション - public static let commitPosition = "7" + public static let commitPosition = "6" /// WebRTC フレームワークのメンテナンスバージョン - public static let maintenanceVersion = "0" + public static let maintenanceVersion = "1" /// WebRTC フレームワークのソースコードのリビジョン - public static let revision = "2abe6e2214fa4fcecdb9614715c55a82c0067e25" + public static let revision = "44bc8e96ed88005fec89a1cc479e291fea30d1b3" /// WebRTC フレームワークのソースコードのリビジョン (短縮版) public static var shortRevision: String { diff --git a/Sora/PeerChannel.swift b/Sora/PeerChannel.swift index e7cbb615..6da114de 100644 --- a/Sora/PeerChannel.swift +++ b/Sora/PeerChannel.swift @@ -1,12 +1,6 @@ import Foundation import WebRTC -/** - ピアチャネルのイベントハンドラです。 - */ -@available(*, unavailable, message: "MediaChannelHandlers を利用してください。") -public class PeerChannelHandlers {} - final class PeerChannelInternalHandlers { /// 接続解除時に呼ばれるクロージャー var onDisconnect: ((Error?, DisconnectReason) -> Void)? @@ -113,7 +107,7 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate { var bundleId: String? var connectionId: String? - var onConnectHandler: ((Error?) -> Void)? + var onConnect: ((Error?) -> Void)? var isAudioInputInitialized: Bool = false @@ -171,7 +165,7 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate { // このロックは finishConnecting() で解除される lock.lock() - onConnectHandler = handler + onConnect = handler // サイマルキャストを利用する場合は、 RTCPeerConnection の生成前に WrapperVideoEncoderFactory を設定する必要がある // また、スポットライトはサイマルキャストを利用しているため、同様に設定が必要になる @@ -233,8 +227,8 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate { if let error { Logger.error(type: .peerChannel, message: "failed connecting to signaling channel (\(error.localizedDescription))") - onConnectHandler?(error) - onConnectHandler = nil + onConnect?(error) + onConnect = nil return } @@ -274,16 +268,13 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate { var role: SignalingRole var multistream = configuration.multistreamEnabled || configuration.spotlightEnabled == .enabled switch configuration.role { - case .publisher, .sendonly: + case .sendonly: role = .sendonly - case .subscriber, .recvonly: + case .recvonly: role = .recvonly - case .group, .sendrecv: + case .sendrecv: role = .sendrecv multistream = true - case .groupSub: - role = .recvonly - multistream = true } let soraClient = "Sora iOS SDK \(SDKInfo.version)" @@ -876,10 +867,10 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate { Logger.debug(type: .peerChannel, message: "native receivers = \(nativeChannel?.receivers.count ?? 0)") - if onConnectHandler != nil { + if onConnect != nil { Logger.debug(type: .peerChannel, message: "call connect(handler:)") - onConnectHandler!(nil) - onConnectHandler = nil + onConnect!(nil) + onConnect = nil } lock.unlock() } @@ -909,10 +900,10 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate { Logger.debug(type: .peerChannel, message: "call onDisconnect") internalHandlers.onDisconnect?(error, reason) - if onConnectHandler != nil { + if onConnect != nil { Logger.debug(type: .peerChannel, message: "call connect(handler:)") - onConnectHandler!(error) - onConnectHandler = nil + onConnect!(error) + onConnect = nil } Logger.debug(type: .peerChannel, message: "did disconnect") diff --git a/Sora/Role.swift b/Sora/Role.swift index 441b0125..b51c1654 100644 --- a/Sora/Role.swift +++ b/Sora/Role.swift @@ -4,26 +4,6 @@ import Foundation 接続するクライアントのロールを表します。 */ public enum Role { - /// この列挙子は sendonly に置き換えられました。 - @available(*, deprecated, renamed: "sendonly", - message: "この列挙子は sendonly に置き換えられました。") - case publisher - - /// この列挙子は recvonly に置き換えられました。 - @available(*, deprecated, renamed: "recvonly", - message: "この列挙子は recvonly に置き換えられました。") - case subscriber - - /// この列挙子は sendrecv に置き換えられました。 - @available(*, deprecated, renamed: "sendrecv", - message: "この列挙子は sendrecv に置き換えられました。") - case group - - /// この列挙子は廃止されました。マルチストリームで recvonly を指定してください。 - @available(*, deprecated, - message: "この列挙子は廃止されました。マルチストリームで recvonly を指定してください。") - case groupSub - /// 送信のみ case sendonly @@ -36,11 +16,7 @@ public enum Role { private var roleTable: PairTable = PairTable(name: "Role", - pairs: [("publisher", .publisher), - ("subscriber", .subscriber), - ("group", .group), - ("groupSub", .groupSub), - ("sendonly", .sendonly), + pairs: [("sendonly", .sendonly), ("recvonly", .recvonly), ("sendrecv", .sendrecv)]) diff --git a/Sora/Signaling.swift b/Sora/Signaling.swift index 33367118..5a386a1c 100644 --- a/Sora/Signaling.swift +++ b/Sora/Signaling.swift @@ -223,20 +223,6 @@ public enum SpotlightRid { case r2 } -/** - シグナリングに含まれるメタデータ (任意のデータ) を表します。 - サーバーから受信するシグナリングにメタデータが含まれる場合は、 - `decoder` プロパティに JSON デコーダーがセットされます。 - 受信したメタデータを任意のデータ型に変換するには、このデコーダーを使ってください。 - */ -@available(*, unavailable, - message: "SignalingMetadata を利用して、メタデータをデコードする方法は廃止されました。 Any? を任意の型にキャストしてデコードしてください。") -public struct SignalingMetadata {} - -@available(*, unavailable, renamed: "SignalingNotifyMetadata", - message: "SignalingClientMetadata は SignalingNotifyMetadata に置き換えられました。") -public struct SignalingClientMetadata {} - /** シグナリングに含まれる、同チャネルに接続中のクライアントに関するメタデータ (任意のデータ) を表します。 */ @@ -310,30 +296,6 @@ public struct SignalingConnect { /// スポットライトの可否 public var spotlightEnabled: Configuration.Spotlight - /// スポットライトの対象人数 - @available(*, deprecated, renamed: "spotlightNumber", - message: "このプロパティは spotlightNumber に置き換えられました。") - public var spotlight: Int? { - get { - spotlightNumber - } - set { - spotlightNumber = newValue - } - } - - /// スポットライトの対象人数 - @available(*, deprecated, renamed: "spotlightNumber", - message: "このプロパティは spotlightNumber に置き換えられました。") - public var activeSpeakerLimit: Int? { - get { - spotlightNumber - } - set { - spotlightNumber = newValue - } - } - /// スポットライトの対象人数 public var spotlightNumber: Int? @@ -535,20 +497,6 @@ public struct SignalingRedirect { public var location: String } -/** - "notify" シグナリングメッセージで通知されるイベントの種別です。 - 詳細は Sora のドキュメントを参照してください。 - 廃止されました。 - */ -@available(*, unavailable, message: "SignalingNotifyEventType は廃止されました。") -public enum SignalingNotifyEventType {} - -/// "notify" シグナリングメッセージを表します。 -/// -/// type:notify の event_type ごとに struct を定義するのではなく、 type: notify に対して1つの struct を定義しています。 -/// そのため、アクセスする際は eventType をチェックする必要があります。 -/// -/// 上記の理由により、この struct では、 eventType 以外のパラメーターを Optional にする必要があります。 public struct SignalingNotify { // MARK: イベント情報 @@ -598,14 +546,6 @@ public struct SignalingNotify { /// 接続中のクライアントの数 public var connectionCount: Int? - /// 接続中のパブリッシャーの数 - @available(*, deprecated, message: "このプロパティは channelSendonlyConnections と channelSendrecvConnections に置き換えられました。") - public var publisherCount: Int? - - /// 接続中のサブスクライバーの数 - @available(*, deprecated, message: "このプロパティは channelRecvonlyConnections と channelSendrecvConnections に置き換えられました。") - public var subscriberCount: Int? - /// 接続中の送信専用接続の数 public var channelSendonlyConnections: Int? @@ -628,36 +568,6 @@ public struct SignalingNotify { public var turnTransportType: String? } -/** - "notify" シグナリングメッセージのうち、次のイベントを表します。 - - - `connection.created` - - `connection.updated` - - `connection.destroyed` - - このメッセージは接続の確立後、チャネルへの接続数に変更があるとサーバーから送信されます。 - 廃止されました。 - SignalingNotify を利用してください。 - */ -@available(*, unavailable, message: "SignalingNotifyConnection は廃止されました。 SignalingNotify を利用してください。") -public struct SignalingNotifyConnection {} - -/** - "notify" シグナリングメッセージのうち、 `spotlight.changed` イベントを表します。 - 廃止されました。 - SignalingNotify を利用してください。 - */ -@available(*, unavailable, message: "SignalingNotifySpotlightChanged は廃止されました。 SignalingNotify を利用してください。") -public struct SignalingNotifySpotlightChanged {} - -/** - "notify" シグナリングメッセージのうち、 "network.status" イベントを表します。 - 廃止されました。 - SignalingNotify を利用してください。 - */ -@available(*, unavailable, message: "SignalingNotifyNetworkStatus は廃止されました。 SignalingNotify を利用してください。") -public struct SignalingNotifyNetworkStatus {} - /** "ping" シグナリングメッセージを表します。 このメッセージはサーバーから送信されます。 @@ -810,9 +720,7 @@ extension SpotlightRid: Codable { /// :nodoc: private var roleTable: PairTable = PairTable(name: "SignalingRole", - pairs: [("upstream", .upstream), - ("downstream", .downstream), - ("sendonly", .sendonly), + pairs: [("sendonly", .sendonly), ("recvonly", .recvonly), ("sendrecv", .sendrecv)]) @@ -941,7 +849,7 @@ extension SignalingConnect: Codable { if simulcastEnabled { try container.encode(true, forKey: .simulcast) switch role { - case .downstream, .sendrecv, .recvonly: + case .sendrecv, .recvonly: try container.encodeIfPresent(simulcastRid, forKey: .simulcast_rid) default: break @@ -1173,10 +1081,6 @@ extension SignalingNotify: Codable { connectionTime = try container.decodeIfPresent(Int.self, forKey: .minutes) connectionCount = try container.decodeIfPresent(Int.self, forKey: .channel_connections) - publisherCount = - try container.decodeIfPresent(Int.self, forKey: .channel_upstream_connections) - subscriberCount = - try container.decodeIfPresent(Int.self, forKey: .channel_downstream_connections) channelSendonlyConnections = try container.decodeIfPresent(Int.self, forKey: .channel_sendonly_connections) channelRecvonlyConnections = diff --git a/Sora/SignalingChannel.swift b/Sora/SignalingChannel.swift index 44f7df84..a27ad7e7 100644 --- a/Sora/SignalingChannel.swift +++ b/Sora/SignalingChannel.swift @@ -6,16 +6,6 @@ import Foundation シグナリングメッセージで使われます。 */ public enum SignalingRole: String { - /// この列挙子は sendonly に置き換えられました。 - @available(*, deprecated, renamed: "sendonly", - message: "この列挙子は sendonly に置き換えられました。") - case upstream - - /// この列挙子は recvonly に置き換えられました。 - @available(*, deprecated, renamed: "recvonly", - message: "この列挙子は recvonly に置き換えられました。") - case downstream - /// 送信のみ case sendonly @@ -29,8 +19,6 @@ public enum SignalingRole: String { /** シグナリングチャネルのイベントハンドラです。 */ -@available(*, unavailable, message: "MediaChannelHandlers を利用してください。") -public class SignalingChannelHandlers {} class SignalingChannelInternalHandlers { /// 接続解除時に呼ばれるクロージャー @@ -73,7 +61,7 @@ class SignalingChannel { // また、 SignalingChannel で利用する WebSocket が決定した場合にも空になる var webSocketChannelCandidates: [URLSessionWebSocketChannel] = [] - private var onConnectHandler: ((Error?) -> Void)? + private var onConnect: ((Error?) -> Void)? // WebSocket の接続を複数同時に試行する際の排他制御を行うためのキュー // @@ -150,9 +138,9 @@ class SignalingChannel { weakSelf.state = .connected - if weakSelf.onConnectHandler != nil { + if weakSelf.onConnect != nil { Logger.debug(type: .signalingChannel, message: "call connect(handler:)") - weakSelf.onConnectHandler!(nil) + weakSelf.onConnect!(nil) } } @@ -204,7 +192,7 @@ class SignalingChannel { } Logger.debug(type: .signalingChannel, message: "try connecting") - onConnectHandler = handler + onConnect = handler state = .connecting let urlCandidates = unique(urls: configuration.urlCandidates) diff --git a/Sora/Sora.swift b/Sora/Sora.swift index e3f05eee..c6c31ec5 100644 --- a/Sora/Sora.swift +++ b/Sora/Sora.swift @@ -4,38 +4,6 @@ import WebRTC /// `Sora` オブジェクトのイベントハンドラです。 public final class SoraHandlers { - /// このプロパティは onConnect に置き換えられました。 - @available(*, deprecated, renamed: "onConnect", - message: "このプロパティは onConnect に置き換えられました。") - public var onConnectHandler: ((MediaChannel?, Error?) -> Void)? { - get { onConnect } - set { onConnect = newValue } - } - - /// このプロパティは onDisconnect に置き換えられました。 - @available(*, deprecated, renamed: "onDisconnect", - message: "このプロパティは onDisconnect に置き換えられました。") - public var onDisconnectHandler: ((MediaChannel, Error?) -> Void)? { - get { onDisconnect } - set { onDisconnect = newValue } - } - - /// このプロパティは onAddMediaChannel に置き換えられました。 - @available(*, deprecated, renamed: "onAddMediaChannel", - message: "このプロパティは onAddMediaChannel に置き換えられました。") - public var onAddMediaChannelHandler: ((MediaChannel) -> Void)? { - get { onAddMediaChannel } - set { onAddMediaChannel = newValue } - } - - /// このプロパティは onRemoveMediaChannel に置き換えられました。 - @available(*, deprecated, renamed: "onRemoveMediaChannel", - message: "このプロパティは onRemoveMediaChannel に置き換えられました。") - public var onRemoveMediaChannelHandler: ((MediaChannel) -> Void)? { - get { onRemoveMediaChannel } - set { onRemoveMediaChannel = newValue } - } - /// 接続成功時に呼ばれるクロージャー public var onConnect: ((MediaChannel?, Error?) -> Void)? @@ -309,16 +277,16 @@ public final class Sora { if output == .speaker { options = [options, .defaultToSpeaker] } - try session.setCategory(category, options: options) + try session.setCategory(category, with: options) try session.setMode(.default) case .videoChat: - try session.setCategory(.playAndRecord, options: options) + try session.setCategory(.playAndRecord, with: options) try session.setMode(.videoChat) case let .voiceChat(output: output): if output == .speaker { options = [options, .defaultToSpeaker] } - try session.setCategory(.playAndRecord, options: options) + try session.setCategory(.playAndRecord, with: options) try session.setMode(.voiceChat) if output == .speaker { try session.overrideOutputAudioPort(.speaker) @@ -426,16 +394,3 @@ public final class ConnectionTask { } } } - -/// :nodoc: -extension RTCAudioSession { - func setCategory(_ category: AVAudioSession.Category, - options: AVAudioSession.CategoryOptions = []) throws - { - try setCategory(category.rawValue, with: options) - } - - func setMode(_ mode: AVAudioSession.Mode) throws { - try setMode(mode.rawValue) - } -} diff --git a/Sora/VideoCapturer.swift b/Sora/VideoCapturer.swift index d419b250..c9e2b188 100644 --- a/Sora/VideoCapturer.swift +++ b/Sora/VideoCapturer.swift @@ -1,27 +1,6 @@ import Foundation import WebRTC -/** - 映像キャプチャーのイベントハンドラです。 - 廃止されました。 - */ -@available(*, unavailable, message: "VideoCapturerHandlers は廃止されました。 CameraVideoCapturerHandlers を利用してください。") -public final class VideoCapturerHandlers {} - -/** - 映像キャプチャーの機能を定義したプロトコルです。 - 生成した映像フレームを引数として `MediaStream.send(videoFrame:)` に与えると、 - 映像フレームが (フィルターがセットされていれば加工されて) サーバーに送信されます。 - - 映像キャプチャーとデータの送受信は別であることに注意してください。 - 映像キャプチャーが映像フレームを生成しても、 - メディアストリームなしではサーバーに映像が送信されません。 - - 廃止されました。 - */ -@available(*, unavailable, message: "VideoCapturer は廃止されました。") -public protocol VideoCapturer: AnyObject {} - /** 映像フィルターの機能を定義したプロトコルです。 `MediaStream.videoFilter` にセットすると、 diff --git a/Sora/VideoCapturerDevice.swift b/Sora/VideoCapturerDevice.swift deleted file mode 100644 index 92e70f32..00000000 --- a/Sora/VideoCapturerDevice.swift +++ /dev/null @@ -1,10 +0,0 @@ -import Foundation - -/** - `Sora` の `Configuration` 内で使用するオプションです。 - - `Configuration` 内で `videoEnabled` が有効になっている際に、初期値としてどの `VideoCapturer` が使用されるかを指定するオプションです。 - 廃止されました。 - */ -@available(*, unavailable, message: "VideoCapturerDevice は廃止されました。") -public enum VideoCapturerDevice {} diff --git a/Sora/WebSocketChannel.swift b/Sora/WebSocketChannel.swift index 86fad0ef..39241bdb 100644 --- a/Sora/WebSocketChannel.swift +++ b/Sora/WebSocketChannel.swift @@ -144,42 +144,8 @@ public final class WebSocketChannelHandlers { /// 初期化します。 public init() {} - /// このプロパティは onReceive に置き換えられました。 - @available(*, deprecated, renamed: "onReceive", - message: "このプロパティは onReceive に置き換えられました。") - public var onMessageHandler: ((WebSocketMessage) -> Void)? { - get { onReceive } - set { onReceive = newValue } - } - /// メッセージ受信時に呼ばれるクロージャー public var onReceive: ((WebSocketMessage) -> Void)? - - // MARK: - 廃止された API - - /// onDisconnectHandler は廃止されました。 - @available(*, unavailable, message: "onDisconnectHandler は廃止されました。") - public var onDisconnectHandler: ((Error?) -> Void)? - - /// onPongHandler は廃止されました。 - @available(*, unavailable, message: "onPongHandler は廃止されました。") - public var onPongHandler: ((Data?) -> Void)? - - /// onSendHandler は廃止されました。 - @available(*, unavailable, message: "onSendHandler は廃止されました。") - public var onSendHandler: ((WebSocketMessage) -> WebSocketMessage)? - - /// 接続解除時に呼ばれるクロージャー - @available(*, unavailable, message: "onDisconnect は廃止されました。") - public var onDisconnect: ((Error?) -> Void)? - - /// pong の送信時に呼ばれるクロージャー - @available(*, unavailable, message: "onPong は廃止されました。") - public var onPong: ((Data?) -> Void)? - - /// メッセージ送信時に呼ばれるクロージャー - @available(*, unavailable, message: "onSend は廃止されました。") - public var onSend: ((WebSocketMessage) -> WebSocketMessage)? } final class WebSocketChannelInternalHandlers { @@ -188,14 +154,3 @@ final class WebSocketChannelInternalHandlers { public var onReceive: ((WebSocketMessage) -> Void)? public init() {} } - -/** - WebSocket による通信を行うチャネルの機能を定義したプロトコルです。 - デフォルトの実装は非公開 (`internal`) であり、 - 通信処理のカスタマイズはイベントハンドラでのみ可能です。 - ソースコードは公開していますので、実装の詳細はそちらを参照してください。 - - WebSocket チャネルはシグナリングチャネル `SignalingChannel` により使用されます。 - */ -@available(*, unavailable, message: "WebSocketChannel プロトコルは廃止されました。") -public protocol WebSocketChannel: AnyObject {}