-
Notifications
You must be signed in to change notification settings - Fork 164
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Describe the bug
I was able to create simple application which just launches camera and draws it onto VideoView.
SDK Version
2.3.1
iOS/macOS Version
18.3.1 - iPad 11' 1st GEN (Intel)
Steps to Reproduce
Run the below code on older device. Works perfectly on my iPhone 15 Pro, but fails on my iPad.
(previous SDK versions worked perfectly)
(changing renderMode to sampleBuffer solves the issue too)
import UIKit
import LiveKit
import MetalKit
class ViewController: UIViewController {
lazy var metalView: VideoView = {
let view = VideoView()
view.backgroundColor = .red
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()
lazy var track = LocalVideoTrack.createCameraTrack()
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(metalView)
NSLayoutConstraint.activate([
metalView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
metalView.centerYAnchor.constraint(equalTo: view.centerYAnchor),
metalView.widthAnchor.constraint(equalToConstant: 300),
metalView.heightAnchor.constraint(equalToConstant: 600),
])
Task {
do {
try await track.start()
metalView.track = track
} catch {
print(error)
}
}
}
}Stack when pausing the debugger during the freeze.
