diff --git a/example/ios/music2.mp3 b/example/ios/music2.mp3 new file mode 100644 index 0000000..bf5fec6 Binary files /dev/null and b/example/ios/music2.mp3 differ diff --git a/ios-common/Classes/WebRTCClient.swift b/ios-common/Classes/WebRTCClient.swift index a85bbb2..758cf75 100644 --- a/ios-common/Classes/WebRTCClient.swift +++ b/ios-common/Classes/WebRTCClient.swift @@ -144,7 +144,7 @@ open class WebRTCClient: NSObject { public func setRatio(originalWidth: Int32, originalHeight: Int32) { let targetWidth:Int32 = 600; - let targetHeight:Int32 = targetWidth * Int32(originalHeight / originalWidth) + let targetHeight:Int32 = Int32( Double(targetWidth) * ( Double(originalHeight) / Double(originalWidth) ) ) videoSource!.adaptOutputFormat(toWidth: targetWidth, height: targetHeight, fps: 15) self.isRatioDefined = true;