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

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

This information must be obtained from since portal, once you register your app in their portal.
Check Platform for more details.
Can be used to hide local camera.
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
Check User control license for more details.
It must be used to initialize the Sinch SDK. It is recommended to be invoked in the 'ClientStart' event.
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.
Ends the video call.
It is invoked if the Sinch SDK is correctly initialized after the 'initClient' method is used.
It is invoked if there is an error initializing the Sinch SDK after the 'initClient' method is used.
Raised when the call is correctly placed.
Raised once the call is established.
Raised if the remote vide stream is successfully received.
Raised when the call is finished by either the local or the remote client
// 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
|