isPreviewing
A Boolean value that indicates whether the layer is rendering video frames from its source.
Declaration
var isPreviewing: Bool { get }Discussion
A preview layer begins displaying content when you call the capture session’s startRunning() method. If you associate the layer with an instance of AVCaptureMultiCamSession, the system guarantees that all video preview layers display content by the time the blocking call to startRunning() or commitConfiguration() returns.
While a session is running, you may enable or disable a video preview layer’s connection to start or stop the flow of video to the layer. You may key-value observe the connection’s isEnabled property to observe this property changing, and synchronize any user interface changes to take place precisely when the video resumes rendering to the video preview layer.