Skip to content

Commit

Permalink
コードミス修正
Browse files Browse the repository at this point in the history
  • Loading branch information
zztkm committed Oct 1, 2024
1 parent f1776d9 commit 0308873
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sora/SwiftUIVideoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,32 +115,32 @@ public struct SwiftUIVideoView<Background>: View where Background: View {
}

/*
UIKitVideoView を SwiftUIVideoView に統合するためのラッパーです。
VideoView を SwiftUIVideoView に統合するためのラッパーです。
*/
private struct RepresentedVideoView: UIViewRepresentable {
typealias UIViewType = UIKitVideoView
typealias UIViewType = VideoView

@ObservedObject private var controller: VideoController

public init(_ controller: VideoController) {
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
}
}

class VideoController: ObservableObject {
var stream: MediaStream?

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

@Published var isCleared: Bool = false

Expand Down

0 comments on commit 0308873

Please sign in to comment.