         var isVideoMirrored: Bool = true
     }
     
-    @Published private var _state: State = State()
+    @Published private var stateChangeCount: Int = 0
+    
+    private var _state: State = State()
     
     private let stateLock = MTILockCreate()
     

            stateLock.lock()
            defer {
                stateLock.unlock()
            }
            _state = newValue
        }

    
    private let camera: Camera = {
        var configurator = Camera.Configurator()
        #if os(iOS)
        let interfaceOrientation = UIApplication.shared.windows.first(where: { $0.windowScene != nil })?.windowScene?.interfaceOrientation
        #endif
        configurator.videoConnectionConfigurator = { camera, connection in
            #if os(iOS)
            switch interfaceOrientation {
            case .landscapeLeft:
                connection.videoOrientation = .landscapeLeft
            case .landscapeRight:
