diff --git a/Sora.xcodeproj/project.pbxproj b/Sora.xcodeproj/project.pbxproj index 101b6061..02a87cc8 100644 --- a/Sora.xcodeproj/project.pbxproj +++ b/Sora.xcodeproj/project.pbxproj @@ -10,7 +10,7 @@ 3591D8EE27014F7C000AD514 /* PackageInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3591D8ED27014F7C000AD514 /* PackageInfo.swift */; }; 3591D8F027032233000AD514 /* SoraDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3591D8EF27032233000AD514 /* SoraDispatcher.swift */; }; 9100904E1E58B4470099E00E /* VideoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9100904D1E58B4470099E00E /* VideoView.xib */; }; - 910090501E58B5450099E00E /* VideoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9100904F1E58B5450099E00E /* VideoView.swift */; }; + 910090501E58B5450099E00E /* UIKitVideoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9100904F1E58B5450099E00E /* UIKitVideoView.swift */; }; 9106C27E1F31A3470019E3C7 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9106C27D1F31A3470019E3C7 /* Logger.swift */; }; 910EABE61F4FF88B00D81213 /* NativePeerChannelFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 910EABE51F4FF88B00D81213 /* NativePeerChannelFactory.swift */; }; 910F2DB124D7F6EE007336A6 /* Statistics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 910F2DB024D7F6EE007336A6 /* Statistics.swift */; }; @@ -77,7 +77,7 @@ 3591D8ED27014F7C000AD514 /* PackageInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PackageInfo.swift; sourceTree = ""; }; 3591D8EF27032233000AD514 /* SoraDispatcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SoraDispatcher.swift; sourceTree = ""; }; 9100904D1E58B4470099E00E /* VideoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VideoView.xib; sourceTree = ""; }; - 9100904F1E58B5450099E00E /* VideoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoView.swift; sourceTree = ""; }; + 9100904F1E58B5450099E00E /* UIKitVideoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIKitVideoView.swift; sourceTree = ""; }; 910444CE253EC6F400EA06BE /* AudioMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioMode.swift; sourceTree = ""; }; 9106C27D1F31A3470019E3C7 /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; 910EABE51F4FF88B00D81213 /* NativePeerChannelFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativePeerChannelFactory.swift; sourceTree = ""; }; @@ -213,7 +213,7 @@ 9174A8921F73F8CF00D586C4 /* VideoCodec.swift */, 91FA6F201D93CA9800D38DB4 /* VideoFrame.swift */, 91B1D6451D75E11F00112A4E /* VideoRenderer.swift */, - 9100904F1E58B5450099E00E /* VideoView.swift */, + 9100904F1E58B5450099E00E /* UIKitVideoView.swift */, 91672C781F78F7FC002300E7 /* WebRTCConfigration.swift */, 91554F421F179CFD00403C39 /* WebSocketChannel.swift */, 9100904D1E58B4470099E00E /* VideoView.xib */, @@ -414,7 +414,7 @@ 9106C27E1F31A3470019E3C7 /* Logger.swift in Sources */, 9174A8931F73F8CF00D586C4 /* VideoCodec.swift in Sources */, 910EABE61F4FF88B00D81213 /* NativePeerChannelFactory.swift in Sources */, - 910090501E58B5450099E00E /* VideoView.swift in Sources */, + 910090501E58B5450099E00E /* UIKitVideoView.swift in Sources */, 91FA6F211D93CA9800D38DB4 /* VideoFrame.swift in Sources */, 91629BF21F8E5099001193D0 /* Array+Base.swift in Sources */, 9173595E1F2CCEBF00806F8B /* Configuration.swift in Sources */, diff --git a/Sora/Logger.swift b/Sora/Logger.swift index 2e28e779..0e49bc90 100644 --- a/Sora/Logger.swift +++ b/Sora/Logger.swift @@ -46,7 +46,7 @@ extension LogType: CustomStringConvertible { case .videoRenderer: return "VideoRenderer" case .videoView: - return "VideoView" + return "VideoView" // TODO(zztkm): ここも UIKitVIdeoView に変更してよいか確認する case let .user(name): return name case .configurationViewController: diff --git a/Sora/VideoView.swift b/Sora/UIKitVideoView.swift similarity index 98% rename from Sora/VideoView.swift rename to Sora/UIKitVideoView.swift index f5eb7072..ac468427 100644 --- a/Sora/VideoView.swift +++ b/Sora/UIKitVideoView.swift @@ -26,7 +26,8 @@ public struct VideoViewHandlers { VideoView のエイリアスです VideoView は現在非推奨になっており、UIKitVideoView を利用することを推奨しています */ -typealias UIKitVideoView = VideoView +@available(*, deprecated, renamed: "UIKitVideoView") +typealias VideoView = UIKitVideoView /** VideoRenderer プロトコルのデフォルト実装となる UIView です。 @@ -45,7 +46,7 @@ typealias UIKitVideoView = VideoView Storyboard や Interface Builder 上で設定した Content Mode の値が使用されます。 */ -public class VideoView: UIView { +public class UIKitVideoView: UIView { // キーウィンドウ外で RTCEAGLVideoView を生成すると次のエラーが発生するため、 // contentView を Nib ファイルでセットせずに遅延プロパティで初期化する // "Failed to bind EAGLDrawable: to GL_RENDERBUFFER 1" @@ -60,7 +61,7 @@ public class VideoView: UIView { fatalError("cannot load VideoView's nib file") } #else - guard let topLevel = Bundle(for: VideoView.self) + guard let topLevel = Bundle(for: UIKitVideoView.self) .loadNibNamed("VideoView", owner: self, options: nil) else { fatalError("cannot load VideoView's nib file") @@ -217,7 +218,7 @@ public class VideoView: UIView { // MARK: - VideoRenderer /// :nodoc: -extension VideoView: VideoRenderer { +extension UIKitVideoView: VideoRenderer { /// :nodoc: public func onChange(size: CGSize) { contentView.onVideoFrameSizeUpdated(size) diff --git a/Sora/VideoView.xib b/Sora/VideoView.xib index 5ebe502c..e133a301 100644 --- a/Sora/VideoView.xib +++ b/Sora/VideoView.xib @@ -1,21 +1,20 @@ - + - - + - + - +