Before getting started, please check the VideoCall Native Mobile Requirements section.
To use video calls in a mobile environment, create a 'Panel', 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 the video call provider platform, once you register your app in their portal.
These properties can be modified on any event, at runtime, but they can only be modified before the 'initClient' method is used.
Check Platform for more details.
Can be used to hide the 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
Defines how the SDK will react when a call is received.
- Notify: The 'CallReceived' event will be fired.
- Ignore: The SDK will not receive calls.
- Answer: The 'CallReceived' event will be fired, and then, the call will be automatically answered
In case the call stops receiving data, the SDK will wait a couple of seconds just in case the communication is restored.
This property defines the maximum amount of seconds that the SDK will wait before considering that the call was dropped.
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
|