VirtualEventDelegate

public protocol VirtualEventDelegate : AnyObject

When set on the VirtualService, the delegate will invoke various events allowing you to capture analytics.

Important

all functions returned here for only for analytic purposes. Any errors returned in onVirtualVisitError are “soft” errors - meaning the virtual visit will still be running.

Note

All “hard” failures, should be caught inside the failure closure when starting or resume a virtual visit.
  • Called when the virtual visit waiting room is first displayed to the user.

    Declaration

    Swift

    func onWaitingRoomLaunched()
  • Called when the waiting room session is disconnected. SDK will return as a failure in the main closure

    Declaration

    Swift

    func onWaitingRoomDisconnected()
  • Called when the SDK attempts to reconnect to the waiting room session

    Declaration

    Swift

    func onWaitingRoomReconnecting()
  • Called when the SDK successfully reconnects to the waiting room session

    Declaration

    Swift

    func onWaitingRoomReconnected()
  • Called when the user is transferred back to the waiting from after already being in a visit

    Declaration

    Swift

    func onWaitingRoomTransferred()
  • Called when the virtual visit session is disconnected. SDK will return as a failure in the main closure

    Declaration

    Swift

    func onVirtualVisitDisconnected()
  • Called when the SDK attempts to reconnect to the virtual visit session

    Declaration

    Swift

    func onVirtualVisitReconnecting()
  • Called when the SDK successfully reconnects to the virtual visit session

    Declaration

    Swift

    func onVirtualVisitReconnected()
  • Called when the Provider connects to the patient’s session and starts the visit.

    Declaration

    Swift

    func onVirtualVisitStarted()
  • Called when the visit is closed (successfully or not). See VisitCompletionReason

    Declaration

    Swift

    func onVirtualVisitCompleted(reason: VisitCompletionReason)
  • Called when the user cancelled the visit from the waiting room.

    Declaration

    Swift

    func onVirtualVisitCancelledByUser()
  • Called when the provider declines to see the patient.

    Note

    Patients are not charged for incomplete visits

    Declaration

    Swift

    func onVirtualVisitDeclinedByProvider()
  • Called when something went wrong inside the virtual visit.

    Note

    This does not mean that the visit failed or cannot continue.

    Declaration

    Swift

    func onVirtualVisitError(error: VirtualVisitEventError)
  • Called when a device pairing is initiated. Currently, TytoCare is the only supported integration.

    Note

    This callback is invoked when the QR code is generated and displayed to the user.

    Declaration

    Swift

    func onDevicePairInitiated()