11.07.2015 Views

Mizu Webphone - Mizu Voip

Mizu Webphone - Mizu Voip

Mizu Webphone - Mizu Voip

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• async: false if no, true if playback should be done in a separate thread• islocal: true if the file have to be read from the client PC file system. False if remote file (for example if the file is on the webserver)• toremotepeer: stream the playback to the connected peer• line: used with toremotepeer if there are multiple calls in progress to specify the call (usually set to -1 for the current call if any)• audiodevice: you can specify an exact device for playback. Otherwise set it to empty string• isring: wheter this sound is a ringtone/ringbackExamples:-playback a file locally (mysound.wav must exist on your webserver near the webphone.jar file):API_PlaySound(1, "mysound.wav", 0, false, false,false, -1)-playback a file to the connected remote peer (mysound.wav must exist on your webserver near the webphone.jar file):API_PlaySound(1, “mysound.wav", 0, false, false,true, -1)-stop the playback:API_PlaySound(0, "", 0, false, false,false, -1)boolean API_AudioDevice()Open audio device selector dialog (built-in user interface).string API_GetAudioDeviceList(int dev)Will return the list of audio devices separated by \r\n.Set the dev parameter to 0 to list the recording device names. Set to 1 for to get the playback or ringer devices.Note: usually you don’t need to use this function. Just call the “API_AudioDevice” to let the users to change their audio settings.boolean API_SetAudioDevice(int dev, string devicename,int immediate)Select an audio device. The devicename should be a valid audio device name (you can list them with the API_GetAudioDeviceList call)The “dev” parameter can have the following values:-0: recording device (microphone)-1: playback device (speaker, headset)-2: ringer device (speaker, headset)The “immediate” parameter can have the following values:-0: default (after the “changeaudiodevimmediate” applet parameter)-1: next call only-2: immediately for active callsNote:For the ringer device you can also pass the “All” string as the devicename to make the webphone to ring on all devices for incoming calls.All devices can also accept the “Default” devicename which will select the system default audio device.For the device you can also pass a number which is the order of the audio device as returned by API_GetAudioDeviceList staring from 1. Validvalues are between 1 and 9 or 0 for the system default device.Usually you don’t need to use this function. Just call the “API_AudioDevice” to let the users to change their audio settings.boolean API_SetVolume(int dev,int volume)Set volume (0-100%) for the selected device.The dev parameter can have the following values:-0 for the recording (microphone) audio device-1 for the playback (speaker) audio device-2 for the ringback (speaker) audio deviceint API_GetVolume(int dev)Return the volume (0-100%) for the selected device.The dev parameter can have the following values:-0 for the recording (microphone) audio device-1 for the playback (speaker) audio device-2 for the ringback (speaker) audio device

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!