add continuous vibration
This commit is contained in:
parent
57a04f4ff5
commit
42676188c7
|
@ -9,6 +9,8 @@ final class IncomingCallBanner: UIView, UIGestureRecognizerDelegate {
|
|||
let uuid: String
|
||||
let sdp: RTCSessionDescription
|
||||
|
||||
private var vibrationTimer: Timer?
|
||||
|
||||
// MARK: UI Components
|
||||
private lazy var profilePictureView: ProfilePictureView = {
|
||||
let result = ProfilePictureView()
|
||||
|
@ -176,10 +178,13 @@ final class IncomingCallBanner: UIView, UIGestureRecognizerDelegate {
|
|||
UIView.animate(withDuration: 0.5, delay: 0, options: [], animations: {
|
||||
self.alpha = 1.0
|
||||
}, completion: nil)
|
||||
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
|
||||
vibrationTimer = WeakTimer.scheduledTimer(timeInterval: 0.5, target: self, userInfo: nil, repeats: true) { _ in
|
||||
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)
|
||||
}
|
||||
}
|
||||
|
||||
public func dismiss() {
|
||||
vibrationTimer?.invalidate()
|
||||
UIView.animate(withDuration: 0.5, delay: 0, options: [], animations: {
|
||||
self.alpha = 0.0
|
||||
}, completion: { _ in
|
||||
|
|
|
@ -243,7 +243,7 @@ public final class WebRTCSession : NSObject, RTCPeerConnectionDelegate {
|
|||
}
|
||||
|
||||
public func peerConnectionShouldNegotiate(_ peerConnection: RTCPeerConnection) {
|
||||
// Do nothing
|
||||
print("[Calls] Peer connection should negotiate.")
|
||||
}
|
||||
|
||||
public func peerConnection(_ peerConnection: RTCPeerConnection, didChange state: RTCIceConnectionState) {
|
||||
|
|
Loading…
Reference in New Issue