Skip to content

Commit f1776d9

Browse files
committed
SwiftUIVideoView の rename 漏れの対応
1 parent ab4aa96 commit f1776d9

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Sora/SwiftUIVideoView.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ public struct SwiftUIVideoView<Background>: View where Background: View {
4646
デバッグモードを有効にします。
4747
有効にすると、映像の上部に解像度とフレームレートを表示します。
4848
*/
49-
public func debugMode(_ flag: Bool) -> Video<Background> {
49+
public func debugMode(_ flag: Bool) -> SwiftUIVideoView<Background> {
5050
controller.videoView.debugMode = flag
5151
return self
5252
}
5353

5454
/// 映像ソース停止時の処理を指定します。
55-
public func connectionMode(_ mode: VideoViewConnectionMode) -> Video<Background> {
55+
public func connectionMode(_ mode: VideoViewConnectionMode) -> SwiftUIVideoView<Background> {
5656
controller.videoView.connectionMode = mode
5757
return self
5858
}
5959

6060
/// 映像のアスペクト比を指定します。
61-
public func videoAspect(_ contentMode: ContentMode) -> Video<Background> {
61+
public func videoAspect(_ contentMode: ContentMode) -> SwiftUIVideoView<Background> {
6262
var uiContentMode: UIView.ContentMode
6363
switch contentMode {
6464
case .fill:
@@ -71,16 +71,16 @@ public struct SwiftUIVideoView<Background>: View where Background: View {
7171
}
7272

7373
/// 映像のクリア時に表示する背景ビューを指定します。
74-
public func videoBackground<Background>(_ background: Background) -> Video<Background> where Background: View {
75-
var new = Video<Background>(stream, background: background)
74+
public func videoBackground<Background>(_ background: Background) -> SwiftUIVideoView<Background> where Background: View {
75+
var new = SwiftUIVideoView<Background>(stream, background: background)
7676
new.controller = controller
7777
return new
7878
}
7979

8080
/**
8181
映像の描画を停止します。
8282
*/
83-
public func videoStop(_ flag: Bool) -> Video<Background> {
83+
public func videoStop(_ flag: Bool) -> SwiftUIVideoView<Background> {
8484
if flag {
8585
controller.videoView.stop()
8686
} else if !controller.videoView.isRendering {
@@ -93,7 +93,7 @@ public struct SwiftUIVideoView<Background>: View where Background: View {
9393
画面を背景ビューに切り替えます。
9494
このメソッドは描画停止時のみ有効です。
9595
*/
96-
public func videoClear(_ flag: Bool) -> Video<Background> {
96+
public func videoClear(_ flag: Bool) -> SwiftUIVideoView<Background> {
9797
if flag {
9898
controller.videoView.clear()
9999
controller.isCleared = true
@@ -102,20 +102,20 @@ public struct SwiftUIVideoView<Background>: View where Background: View {
102102
}
103103

104104
/// 映像のサイズの変更時に実行されるブロックを指定します。
105-
public func videoOnChange(perform: @escaping (CGSize) -> Void) -> Video<Background> {
105+
public func videoOnChange(perform: @escaping (CGSize) -> Void) -> SwiftUIVideoView<Background> {
106106
controller.videoView.handlers.onChange = perform
107107
return self
108108
}
109109

110110
/// 映像フレームの描画時に実行されるブロックを指定します。
111-
public func videoOnRender(perform: @escaping (VideoFrame?) -> Void) -> Video<Background> {
111+
public func videoOnRender(perform: @escaping (VideoFrame?) -> Void) -> SwiftUIVideoView<Background> {
112112
controller.videoView.handlers.onRender = perform
113113
return self
114114
}
115115
}
116116

117117
/*
118-
VideoView (UIKit) を SwiftUI view に統合するためのラッパーです。
118+
UIKitVideoView を SwiftUIVideoView に統合するためのラッパーです。
119119
*/
120120
private struct RepresentedVideoView: UIViewRepresentable {
121121
typealias UIViewType = UIKitVideoView
@@ -126,21 +126,21 @@ private struct RepresentedVideoView: UIViewRepresentable {
126126
self.controller = controller
127127
}
128128

129-
public func makeUIView(context: Context) -> VideoView {
129+
public func makeUIView(context: Context) -> UIKitVideoView {
130130
controller.videoView
131131
}
132132

133-
public func updateUIView(_ uiView: VideoView, context: Context) {
133+
public func updateUIView(_ uiView: UIKitVideoView, context: Context) {
134134
controller.stream?.videoRenderer = uiView
135135
}
136136
}
137137

138138
class VideoController: ObservableObject {
139139
var stream: MediaStream?
140140

141-
// init() で VideoView を生成すると次のエラーが出るので、生成のタイミングを遅らせておく
141+
// init() で UIKitVideoView を生成すると次のエラーが出るので、生成のタイミングを遅らせておく
142142
// Failed to bind EAGLDrawable: <CAEAGLLayer: 0x********> to GL_RENDERBUFFER 1
143-
lazy var videoView = VideoView()
143+
lazy var videoView = UIKitVideoView()
144144

145145
@Published var isCleared: Bool = false
146146

0 commit comments

Comments
 (0)