Page 1 of 1

xDeviceAudioRecord

Posted: Wed Mar 01, 2017 8:46 pm
by soa
I want to record some audio in a LMA VL Web app and store the resultant mp3 in my database. I assumed I could do this through the server module but the documentation seems to imply that Longreach is required. This would not be ideal as Longreach requires that a non-standard port be opened in the firewall and does allow us store to the mp3 and its meta data in a single operation. Is this correct?

Re: xDeviceAudioRecord

Posted: Thu Mar 02, 2017 3:03 pm
by Stewart Marshall
Yes, that's correct as at today.

Tighter integration with VL Web is a work in progress. We're hoping (no promises) to deliver this as part of SP2

Regards

Re: xDeviceAudioRecord

Posted: Fri Mar 03, 2017 8:12 am
by soa
I would be very keen to see this.

Re: xDeviceAudioRecord

Posted: Mon Mar 06, 2017 10:39 am
by tsupartono
In the interim, if this can be of help, I have an example of how you can use a widget to send your audio file to a server module (as a BLOB field). Attached is a LANSA export package containing 3 items:
  • SendBlobWidget
  • SaveBlobTestServerModule
  • SaveBlobTestWebPage
The webpage shows you how you can use the xDeviceFileRead to read the audio file after recording (using xDeviceAudioRecord), and subsequently use the SendBlobWidget example to send the audio content as a BLOB data to the server module.
One thing to note, if you are using server sessions, you would need to set your server module's session-key-method to COOKIE (the default is HIDDEN). See the server module example in the export package.

Re: xDeviceAudioRecord

Posted: Mon Mar 06, 2017 9:56 pm
by soa
That's great news. I'll check it out asap.

Re: xDeviceAudioRecord

Posted: Fri Mar 10, 2017 5:34 pm
by soa
I can't get this to work. How long does it take to load - I've waited up to a minute.


Fatal Error:

Can't access a widget before it has completed loading
Location:

Web Page: SaveBlobTestWebPage, line 16
Call Stack:

1. Evtroutine Handling(#RecordButton.Click): SaveBlobTestWebPage, line 16
Reported By:

http://localhost/lansa/lansa_14_1_11_2/lansa_wdgt.js, line 6

Re: xDeviceAudioRecord

Posted: Fri Mar 10, 2017 5:35 pm
by soa
Please ignore my dumb error - of course it doesn't work in a browser!

Sorry.

Re: xDeviceAudioRecord - upload example.

Posted: Mon Mar 13, 2017 5:34 pm
by soa
I have installed this app on my ipad and it longers produces an error and 'uplaod' returns a success message. However, I can't determine if anything is being recorded. I've added

Define_Com Class(#xDeviceAudioPlayback) Name(#AudioPlayback)

and new play button with a click event of

Evtroutine Handling(#btnPlay.Click)
#AudioPlayback.File := #AudioRecord.File
#AudioPlayback.Play
Endroutine

but nothing happens when I hit play after recording.There is no sound or error messages. Volume is on full. There appears to be no way on the ipad of looking at the file system to see if a file exists.

Any ideas about what I am doing wrong or how I can verify that this function is working?

Re: xDeviceAudioRecord

Posted: Mon Mar 13, 2017 6:10 pm
by soa
I've modified the supplied server app to store the recorded file in a blob file on our iseries. I've retrieved the file the file system where it is named file.bin. I've changed the extension to .mp3 and played it back. It plays but appears to contain 7 seconds or so of silence. I've tested my microphone by recording a video and this works ok.

Any ideas why the app wouldn't record anything or how to troubleshoot it.

LANSA mobile did ask for permission which I granted. LANSA mobile is listed in settings as allowed to access the mic.

Re: xDeviceAudioRecord

Posted: Tue Mar 14, 2017 6:28 pm
by tsupartono
It records fine on my iPhone.
Can you try on a different device (also on android vs iOS)