From 03088739bd35b48ae1dfa70dbf590620ec3175c5 Mon Sep 17 00:00:00 2001 From: zztkm Date: Tue, 1 Oct 2024 15:48:43 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=83=9F=E3=82=B9?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sora/SwiftUIVideoView.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sora/SwiftUIVideoView.swift b/Sora/SwiftUIVideoView.swift index 24eef733..75b796ea 100644 --- a/Sora/SwiftUIVideoView.swift +++ b/Sora/SwiftUIVideoView.swift @@ -115,10 +115,10 @@ public struct SwiftUIVideoView: View where Background: View { } /* - UIKitVideoView を SwiftUIVideoView に統合するためのラッパーです。 + VideoView を SwiftUIVideoView に統合するためのラッパーです。 */ private struct RepresentedVideoView: UIViewRepresentable { - typealias UIViewType = UIKitVideoView + typealias UIViewType = VideoView @ObservedObject private var controller: VideoController @@ -126,11 +126,11 @@ private struct RepresentedVideoView: UIViewRepresentable { self.controller = controller } - public func makeUIView(context: Context) -> UIKitVideoView { + public func makeUIView(context: Context) -> VideoView { controller.videoView } - public func updateUIView(_ uiView: UIKitVideoView, context: Context) { + public func updateUIView(_ uiView: VideoView, context: Context) { controller.stream?.videoRenderer = uiView } } @@ -138,9 +138,9 @@ private struct RepresentedVideoView: UIViewRepresentable { class VideoController: ObservableObject { var stream: MediaStream? - // init() で UIKitVideoView を生成すると次のエラーが出るので、生成のタイミングを遅らせておく + // init() で VideoView を生成すると次のエラーが出るので、生成のタイミングを遅らせておく // Failed to bind EAGLDrawable: to GL_RENDERBUFFER 1 - lazy var videoView = UIKitVideoView() + lazy var videoView = VideoView() @Published var isCleared: Bool = false