in Broadcasting/BroadcastViewModel.swift [251:264]
func deviceOrientationChanged(toLandscape: Bool) {
if (configurations.customOrientation == .auto) {
let configWidth = configurations.activeVideoConfiguration.size.width
let configHeight = configurations.activeVideoConfiguration.size.height
let width = toLandscape ? max(configWidth, configHeight) : min(configWidth, configHeight)
let height = toLandscape ? min(configWidth, configHeight) : max(configWidth, configHeight)
let error = configurations.updateResolution(for: CGSize(width: width, height: height))
if error == nil {
initializeBroadcastSession()
}
}
}