Skip to content

Commit

Permalink
VideoView から UIKitVideoView に rename する
Browse files Browse the repository at this point in the history
  • Loading branch information
zztkm committed Oct 1, 2024
1 parent 23783c6 commit eee7400
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions Sora.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -77,7 +77,7 @@
3591D8ED27014F7C000AD514 /* PackageInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PackageInfo.swift; sourceTree = "<group>"; };
3591D8EF27032233000AD514 /* SoraDispatcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SoraDispatcher.swift; sourceTree = "<group>"; };
9100904D1E58B4470099E00E /* VideoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VideoView.xib; sourceTree = "<group>"; };
9100904F1E58B5450099E00E /* VideoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoView.swift; sourceTree = "<group>"; };
9100904F1E58B5450099E00E /* UIKitVideoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIKitVideoView.swift; sourceTree = "<group>"; };
910444CE253EC6F400EA06BE /* AudioMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioMode.swift; sourceTree = "<group>"; };
9106C27D1F31A3470019E3C7 /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = "<group>"; };
910EABE51F4FF88B00D81213 /* NativePeerChannelFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativePeerChannelFactory.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 */,
Expand Down
2 changes: 1 addition & 1 deletion Sora/Logger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 5 additions & 4 deletions Sora/VideoView.swift → Sora/UIKitVideoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public struct VideoViewHandlers {
VideoView のエイリアスです
VideoView は現在非推奨になっており、UIKitVideoView を利用することを推奨しています
*/
typealias UIKitVideoView = VideoView
@available(*, deprecated, renamed: "UIKitVideoView")
typealias VideoView = UIKitVideoView

/**
VideoRenderer プロトコルのデフォルト実装となる UIView です。
Expand All @@ -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: <CAEAGLLayer: ***> to GL_RENDERBUFFER 1"
Expand All @@ -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")
Expand Down Expand Up @@ -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)
Expand Down
9 changes: 4 additions & 5 deletions Sora/VideoView.xib
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VideoView"/>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIKitVideoView"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="VideoViewContentView" customModule="Sora">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qak-TX-EGf" customClass="RTCMTLVideoView">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
</view>
<label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Debug Info" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eO6-a0-tZC">
Expand Down

0 comments on commit eee7400

Please sign in to comment.