-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
let tmp = RTCOutboundStats( | ||
kind: it.values["kind"] as? String ?? "", | ||
rid: it.values["rid"] as? String ?? "", | ||
bytesSent: it.values["bytesSent"] as? Int ?? 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's int? not any big number? or NSDecimalNumber
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Int on a modern IPhone has 63 bit precision, which should be more than enough since when changed from bytes it would mean that the peer must have had used several petabytes to exceed that, and backed would prob crash first :P. I changed it to be UInt to get that additional bit of precision, but I think it is irrelevant.
} | ||
|
||
public func getStats() -> [String: RTCStats] { | ||
if connection != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if connection != nil { | |
if let connection = connection { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
This PR mimics fishjam-dev/membrane-webrtc-android@1f88e81 but for IOS sdk