Media library problem

Forum to discuss the Web client version of Servoy.

Media library problem

Postby SteveInLA » Thu May 14, 2009 11:42 pm

I have several WAV files in my solution's media library and a method on a button that uses this line to play the sound file named in a global:
Code: Select all
application.playSound('media:///' + globals.gWAVToPlay + '.wav')

This works fine in the web client when previewed from Developer, but when solution is run in the web client from the Server, this error is returned in the log:
java.net.MalformedURLException: unknown protocol: media
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at com.servoy.j2db.scripting.JSApplication$3.run(JSApplication.java:5)
at com.servoy.j2db.util.TaskExecuter.run(TaskExecuter.java:16)
at java.lang.Thread.run(Unknown Source)

As an alternative to referencing files in the media library, I tried using the servoy_blobloader, but even though the rowid1 value was correct, it only ever plays the sound file from the first record in the database.

Does anyone have a way to make either of these methods work correctly?

Steve in LA
SteveInLA
 
Posts: 233
Joined: Thu Jul 29, 2004 12:00 am
Location: Southern Oregon, USA

Re: Media library problem

Postby lvostinar » Fri May 15, 2009 11:03 am

Hi Steve,

The sound will be played on server when using webclient. This is what you want to achieve ?

Regards, Laurian
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: Media library problem

Postby SteveInLA » Fri May 15, 2009 4:14 pm

No, I don't want the sound to play on the server. I am building a captcha, and there needs to be a button that can be clicked that plays an audio file that speaks the characters visible in the image area of the captcha, so the audio needs to play in the client.
SteveInLA
 
Posts: 233
Joined: Thu Jul 29, 2004 12:00 am
Location: Southern Oregon, USA

Re: Media library problem

Postby lvostinar » Fri May 15, 2009 4:23 pm

Sorry, this is not currently supported. You can file a case for this.
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: Media library problem

Postby SteveInLA » Fri May 15, 2009 5:24 pm

Just so I am clear before I file a case, is it application.playSound() that is not supported on the webclient or the servoy_blobloader not retrieving anything except the first record in a database that is not supported or both?
SteveInLA
 
Posts: 233
Joined: Thu Jul 29, 2004 12:00 am
Location: Southern Oregon, USA

Re: Media library problem

Postby lvostinar » Mon May 18, 2009 10:17 am

playSound is not supported in webclient, servoy_blobloader should work , I think. You can attach a sample for the functionality you want to work.
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 3 guests

cron