• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Thanksgiving Challenge - ListenUp Java Applet integration

Community Beginner ,
Nov 27, 2008 Nov 27, 2008

Copy link to clipboard

Copied

For those that like a Challenge... I came across this Java Applet that appears to be quite powerful to add recording and playing of voice audio files to a website:
http://www.javasonics.com/downloads/

I have not been successful in writing the coldfusion code yet that will read the information that is passed from this Java Applet with respect to sound file (wav), file name, and other fields that are in the form when created.

This is the format of the use of the Applet that I would like to get working on the site:
http://www.javasonics.com/listenup/examples/use_text_fields.html

I look forward to anyone that can get this code working and how you did it with ColdFusion.

Thanks,
Tom
support@daybreakengineering.com

TOPICS
Advanced techniques

Views

504

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Nov 28, 2008 Nov 28, 2008
-==cfSearching==-

Thank you for your help on this and for the detailed step by step on how to implement it and get it working on my server! I really appreciate your help!

A few questions that I do have is you say, "BTW, as you are debugging and testing watch out for caching!"

If I have this on a site and let's say there are 20 people or even 50 people using this Java Applet at the same time recording some audio, what potential problems do you see this causing the server?

What would be the...

Votes

Translate

Translate
Community Beginner ,
Nov 27, 2008 Nov 27, 2008

Copy link to clipboard

Copied

When I run their PHP version that works on a Linux System and the Java Applet debugger on this is the result from the time the file is handed off from the Java Applet to the PHP Code.

Can anyone tell if the file is actually being written to the server then PHP is reading it from the server or is it just being written to memory and PHP is reading a variable or memory block for this data?

ListenUp: 49.081, sendRecordedMessage(message_12345.wav)
ListenUp: 49.091, sendRecordedMessage: upload message_12345.wav
ListenUp: 49.101, start upload, freeMem = 3535456, totalMem = 5640192
ListenUp: 49.431, got compressed image, freeMem = 3453040, totalMem = 5640192
ListenUp: 49.671, got MIME data, freeMem = 3387064, totalMem = 5640192
ListenUp: 49.902, MultipartFormDataUploader: POST size = 15733
ListenUp: 49.902, parseStatusLine: HTTP/1.1 100 Continue, len 21
HTTP/1.1 200 OK
Cache-Control: private
Connection: close
Date: Thu, 27 Nov 2008 18:38:07 GMT
Content-Type: text/plain
Server: Microsoft-IIS/6.0
X-Powered-By: PHP/4.4.1
X-Powered-By: ASP.NET

<param name=userfile>
raw_name = message_12345.wav
name = message_12345.wav
type = audio/wav
size = 15420
Upload dir = ../uploads
duration = 2.6006349206349206
SUCCESS - message_12345.wav uploaded.
ListenUp: 50.332, DynamicMemoryBuffer: deleting array.
ListenUp: 50.332, finished upload, freeMem = 3487480, totalMem = 5640192

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 27, 2008 Nov 27, 2008

Copy link to clipboard

Copied

I have never used it. But I was bored and this is what seemed to work for me on windows. If it works great. If not ... oh well I tried 😉

1. Unpacked files and moved the "listenup" directory to:
c:\coldfusion8\wwwroot\listenup\

2. Downloaded the commons fileupload jar from
[ Download -> http://commons.apache.org/downloads/download_fileupload.cgi ]

.. and placed it in the codebase directory:
c:\coldfusion8\wwwroot\listenup\codebase\


3. Created a subdirectory to store my cfm test files:

c:\coldfusion8\wwwroot\listenup\listenup_cfm\

4. Created two test files. One to display the form and the other to process it on the server.

The form file content is straight out of "use_text_fields.html". I just change the uploadURL to point to my handling page.

<!--- c:\coldfusion8\wwwroot\listenup\listenup_cfm\use_text_fields.html --->
<applet ....>
....
<param name="uploadURL" value="handle_upload_TextFields.cfm">
....
</applet>

My handler page uploads the sound file to a subdirectory and writes the results to the a log file. But you can do whatever you want the results:


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

-==cfSearching==-

Thank you for your help on this and for the detailed step by step on how to implement it and get it working on my server! I really appreciate your help!

A few questions that I do have is you say, "BTW, as you are debugging and testing watch out for caching!"

If I have this on a site and let's say there are 20 people or even 50 people using this Java Applet at the same time recording some audio, what potential problems do you see this causing the server?

What would be the best way to avoid this problem?

Is it memory on the server that would be the limiting factor?

When you say watch out for caching what exactly do you mean by that and what is the best way yo avoid it?

Thanks again for all your help!

V/R,
Tom

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

LATEST
ProWebService wrote:
> If I have this on a site and let's say there are 20 people or even 50 people using this
> Java Applet at the same time recording some audio, what potential problems do you
> see this causing the server?

Since I have not used, I do not know about potential problems other than the usual issues with requests and file uploads: security, server capacity (ie simultaneous requests and file storage), etcetera. But those are not specific to this applet, so there is plenty of material out there on those areas.

Beyond that I would check their documentation for recommendations and known issues. I just put together a rough sample and I did not read much beyond the basics. Just enough to get it working 😉 So your best bet is to check the source.

> When you say watch out for caching what exactly do you mean by that and what is the
> best way yo avoid it?

I just meant there was some browser caching when I ran tests, which threw me off. After making changes, I did not always see the new results in the log files. Not unless I cleared cache. I think using the right cfheaders in the handler page (to specify no cache) should take care of that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 27, 2008 Nov 27, 2008

Copy link to clipboard

Copied

BTW, as you are debugging and testing watch out for caching!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation