|
|
Controls:
To control the Mp3 recording applet it has a few methods which can be accessible from outside, in particular from JavaScript and Java. These methods allow to implement the following controls:
The controls interact with the recording applet via JavaScript or Java. We offer 2 examples:
1. Controls which created by JavaScript. In this case the JavaScript methods call the corresponding Java methods from applet;
2. Controls which created as Java applet which interact with recording applet. In this case 2 applets will be used – Mp3 audio recording applet and interface applet. Source code of interface applet is included to Mp3 audio recording SDK package. So, applet interface can be customized.
Table 1: Public recording applet methods which are accessible outside of applet
Applet methods |
Applet action |
RECORD ( ) |
Start the recording/encoding of audio data |
PLAYBACK ( ) |
Start the playback from client PC |
PAUSE ( ) |
Record/Playback pause |
STOP_RP ( ) |
Stop the record/playback |
UPLOAD (String filename) |
Uploads audio file from client PC to web server. Server script receives the audio file on the server |
WEBPLAY (String filename) |
Playback the recorded audio file from the server. |
SAVE (String filename, String filename) |
Save the recorded audio file on the client computer. |
OPEN (String filename, String filename) |
Open the audio file from the client computer. |
DELETE ( ) |
Delete the audio files from the client computer which was recorded during current session. |
Table 2: JavaScript methods which are accessible from recording applet
Applet methods |
Applet action |
SetStatus_RP (s, num) |
Applet sends status message to JavaScript s – message, num – message number in the Table 5. |
SetTimer_RP (s) |
Applet sends current recording/playback time to JavaScript |
confirmRecord (s,num) |
Confirm re-recording s – message, num – message number in the Table 5. |
addName (s) |
Adds audio file name to list of files for listening from web server. |
report_RP (s) |
Pop-up message |
Table 3: Recording applet parameters
Applet parameter name |
Parameter value |
Parameter description |
"ServerScript" |
e.g. "http://www.conaito.com/voicefiles/retrive.php" |
Server script URL |
"VoiceServerFolder" |
e.g. "http://www.conaito.com/voicefiles/" or
|
URL of directory in which the audio files are stored. URL is necessary to playback from server. |
"Sampling_frequency" |
See table 4, 1st column |
Audio sampling frequency |
"Bitrate" |
See table 4. |
In the table 4 available bitrates are defined at each sampling frequency. Bitrate is in kbps. |
"TimeLimit " |
1...N |
N – is maximal recording time in seconds. It is hardcoded in the license file. |
"Registration" |
a) “Demo” b) Name of file with registration key. For example, “RegKey.txt” |
a) Applet works as demo, the maximal recording time is 20 sec. If Registration parameter is absent, applet works as demo, too. b) The registration key file you will receive after licensing. File must be located on the server in the same directory with applet. |
"OverRecord" |
“true/false” |
True – over recording is available without warning message. False (or parameter is absent) - over recording is available with warning message only. |
"BlockSize" |
E.g. 1024 |
Applet uploads audiofile block by block. This parameter defines the size of block in bytes. |
"InterfaceType" |
JS or Java |
Applet can use controls which created by JavaScript (JS) or interface applet (Java). |
"UserPostVariables" |
Variable names. Ex: "Username,Country" |
Number on variable names to upload to server with voice file.
|
"UserServerFolder" |
e.g. "User1_personal_folder" |
Defines the subfolder which is in the VoiceServerFolder. |
"indicatorWidth" |
e.g. 330 |
Defines the horizontal size of input level indicator, in pixels. |
"backgroudColor", "indicatorLevel1", "indicatorLevel2", "indicatorLevel3" |
e.g. "c0c0c0",
|
Colors of input level indicator components.
|
Table 4: Available Bitrates
Sampling frequencies, Hz |
Bitrates, kbps |
8000 |
16, 24, 32, 40, 48, 56 |
11025 |
16, 24, 32, 40, 48, 56, 64, 80 |
16000 |
16, 24, 32, 40, 48, 56, 64, 80, 96, 112 |
22050 |
32, 40, 48, 56, 64, 80, 96, 112, 128, 160 |
24000 |
48, 56, 64, 80, 96, 112, 128, 160 |
32000 |
48, 56, 64, 80, 96, 112, 128, 160, 192, 224 |
44100 |
64, 80, 96, 112, 128, 160, 192, 224, 256, 320 |
48000 |
64, 80, 96, 112, 128, 160, 192, 224, 256, 320 |
The JavaScript interface allows to create controls by JavaScript and HTML possibilities. The most example in the conaito VoiceMail SDK package based on it. JavaScript interface allows to customize applet controls correspondingly with web site scenario and style. The list of recording applet methods which can be accessible from JavaScript are in the Table 1.
The Java applet interface
The idea of Java applet interface is following: exist 2 applets - Mp3 recording applet and interface (front-end) applet. Recording applet has methods which are accessible outside of applet (table 1). Interface applet creates control panel with controls and accesses the recording applet methods (table 1) to control the recording applet. Also, recording applet sends messages to interface applet. Mp3 recording applet SDK package contains open source code of interface applet, so, user can re-design it correspondingly with web site scenario and style. Source code of interface applet is in the conaito VoiceMail SDK package in the Examples/Java/InterfaceApplet folder.
Note! Interface applet works under Java plug-in 1.4-1.6. Under Microsoft JVM Interface applet does not work. So, if you want to use recording applet under Microsoft JVM and Java plug-in 1.4-1.6, you have to use the JavaScript interface.
Any Questions?
Our Support Forum or Knowledgebase/ Helpdesk is the best way for your questions. By this way can we help many user to find a answer on their questions.
Please feel free to contact the conaito Support Team incase of any question.
Copyright © 2008, conaito Technologies - www.conaito.com. All rights reserved.
This help file has been generated by the freeware version of HelpNDoc