Fix build

This commit is contained in:
Ali 2021-01-12 22:51:20 +04:00
parent 66bd30d05a
commit c4027d3fad

View File

@ -206,6 +206,38 @@ public final class OngoingGroupCallContext {
func makeIncomingVideoView(source: UInt32, completion: @escaping (OngoingCallContextPresentationCallVideoView?) -> Void) { func makeIncomingVideoView(source: UInt32, completion: @escaping (OngoingCallContextPresentationCallVideoView?) -> Void) {
self.context.makeIncomingVideoView(withSsrc: source, completion: { view in self.context.makeIncomingVideoView(withSsrc: source, completion: { view in
if let view = view { if let view = view {
#if os(iOS)
completion(OngoingCallContextPresentationCallVideoView(
view: view,
setOnFirstFrameReceived: { [weak view] f in
view?.setOnFirstFrameReceived(f)
},
getOrientation: { [weak view] in
if let view = view {
return OngoingCallVideoOrientation(view.orientation)
} else {
return .rotation0
}
},
getAspect: { [weak view] in
if let view = view {
return view.aspect
} else {
return 0.0
}
},
setOnOrientationUpdated: { [weak view] f in
view?.setOnOrientationUpdated { value, aspect in
f?(OngoingCallVideoOrientation(value), aspect)
}
},
setOnIsMirroredUpdated: { [weak view] f in
view?.setOnIsMirroredUpdated { value in
f?(value)
}
}
))
#else
completion(OngoingCallContextPresentationCallVideoView( completion(OngoingCallContextPresentationCallVideoView(
view: view, view: view,
setOnFirstFrameReceived: { [weak view] f in setOnFirstFrameReceived: { [weak view] f in
@ -238,6 +270,7 @@ public final class OngoingGroupCallContext {
} }
} }
)) ))
#endif
} else { } else {
completion(nil) completion(nil)
} }