Title
Ringer device is used as an output audio device on local machine, on which ringtone will be played when there
is an incoming TelephonyConversation.
As it is shown in Retrieving And Using Media Device Lists tutorial, Ringer device can be acquired from
MultimediaController.ringerList property. Acquired Ringer device can then be set as an active
ringer device through MultimediaController.selectRinger method, as it is shown in the snippet below:
// In this example it is assumed, that used index is valid
var ringer = cwic.MultimediaController.ringerList[0];
cwic.MultimediaController.selectRinger(ringer);
Setting new ringer device as active will trigger
"onMediaDeviceListChanged" event.
Ringer On All Devices
If needed all ringer devices can be active at the same time. This means that, on icoming TelephonyConversation
all ringer devices will play ringtone at the same time. This is achieved through MultimediaController.playRingtoneOnAllRingers
method. Calling this method will cause for ringtone not to be played on active ringer device. If any ringer device is
set as active afterwards, ringtone will be played on an active ringer device instead of all of them. In the snippet
below it is shown how to use this API:
cwic.MultimediaController.playRingtoneOnAllRingers();
Volume Control (Windows OS Only)
Volume control is supported only on Windows OS. Ringer's output volume level can be set through Ringer.setVolume
method. Current output volume level can be read from Ringer.volume property. In the snippet bellow it is demonstrated
how to retrieve and set ringer's output volume level:
// In this example it is assumed, that used index is valid
var ringer = cwic.MultimediaController.ringerList[0];
// Current ringer's output volume level.
var currentVolume = ringer.volume;
// Setting new ringer's output volume level to 50 (0-100 accepted values)
ringer.setVolume(50);