Fix camera switch in swift

This commit is contained in:
Christophe Deschamps 2022-03-23 09:13:00 +01:00
parent 1e45f7d58c
commit b4d6b8c351

View file

@ -30,18 +30,14 @@ extension Core {
}
func toggleCamera() {
UICamSwitch.switchCamera()
/* Not working
Log.i("[Core] Current camera device is \(videoDevice)")
var switched = false
videoDevicesList.forEach {
if ($0 != videoDevice && $0 != "StaticImage: Static picture") {
if (!switched && $0 != videoDevice && $0 != "StaticImage: Static picture") {
Log.i("[Core] New camera device will be \($0)")
try?setVideodevice(newValue: $0)
return
switched = true
}
}
*/
}
}