BroadcastWriter icon indicating copy to clipboard operation
BroadcastWriter copied to clipboard

Screen ratio is being set in reverse

Open hunhee98 opened this issue 2 years ago • 0 comments

Hello, I'm an iOS developer working in Korea. I implemented real-time screen sharing functionality using your library. Thank you. However, I've encountered a problem. When testing on an iPad, it seems that the screen ratio is saved in reverse when creating the writer instance by passing screen.bounds.size directly.

So, when I initialize it in reverse, it worked well, like the code below:

let width = screen.bounds.size.width
let height = screen.bounds.size.height

writer = try .init(
  outputURL: nodeURL,
  screenSize: .init(width: height, height: width),
  screenScale: 3
)

When I changed it to pass the values in accordance with the iPad ratio, the video was saved correctly.

hunhee98 avatar Nov 23 '23 08:11 hunhee98