DVSinchClientSD

To use video calls in a mobile environment, create a 'Panel for SmartDevices', and then drag and drop the user control from the toolbox

dvsinchclient_img_sd_toolbox

The user control must be configured using the 'properties grid'

dvsinchclient_img_sd_properties

Properties

Host, Secret, Key

This information must be obtained from since portal, once you register your app in their portal.

Check Platform for more details.

Show Local Camera

Can be used to hide local camera.

Remote Vide Aspect

Defines how the remote video image will be scaled.

  • Fill
  • Fit 
  • Original: original aspect is used
  • Balanced. Scales the images but it will not crop as much fill. Works only in Android

DVelopKey

Check User control license for more details.

Methods

initClient

It must be used to initialize the Sinch SDK. It is recommended to be invoked in the 'ClientStart' event.

callTo

This method must be invoked to call the remote user. 

It can only be invoked if the Sinch SDK was correctly initialized. Use the event 'ClientDidStart' to ensure SDK initialized.

hangUp

Ends the video call.

Events

ClientDidStart

It is invoked if the Sinch SDK is correctly initialized after the 'initClient' method is used.

ClientDidFail

It is invoked if there is an error initializing the Sinch SDK after the 'initClient' method is used.

CallDidProgress

Raised when the call is correctly placed.

CallDidEstablish

Raised once the call is established.

CallDidAddVideoTrack

Raised if the remote vide stream is successfully received.

CallDidEnd

Raised when the call is finished by either the local or the remote client

Methods and Events example:

// SDK must be initialized as soon as possible. e.g. on the 'ClientStart' event
Event ClientStart
    Composite        
        &LocalClientId = !"SD1"
        DVSinchClient1.initClient(&LocalClientId)
        &VideConferenceStatus = !"Video call is initializing"
    Endcomposite
Endevent

// Once the client is ready, the call can be done automatically, or a "place call" button could be enabled
event DVSinchClient1.ClientDidStart
    Composite
        // In this sample, we place the call as soon as the sdk is ready        
        &VideConferenceStatus = !"Calling"
        DVSinchClient1.callTo(&CallSessionId)
    EndComposite
endevent

event DVSinchClient1.ClientDidFail
    Composite
        // Inform user of the error
        &VideConferenceStatus = !"Error initializing video call SDK"        
        msg(&VideConferenceStatus)
    EndComposite
endevent

event DVSinchClient1.CallDidEnd
    Composite
        // Call ended
        &VideConferenceStatus = !"Video call finished"        
        msg(&VideConferenceStatus)
        return
    EndComposite
endevent

Event DVSinchClient1.CallDidAddVideoTrack
    // This event is called as soon as the video stream is ready
    &VideConferenceStatus = !"Video call progressing"
Endevent

// User events pressed 
Event 'HangUp'
    Composite        
        DVSinchClient1.hangUp()    
    EndComposite
Endevent

Event 'PlaceCall'
    DVSinchClient1.callTo(&CallSessionId)
EndEvent

Event Back
    Composite
        DVSinchClient1.hangUp()
        return
    EndComposite
EndEvent