This content has been marked as final.
Show 4 replies
-
1. Re: play WAV file with a4j:mediaoutput
nbelaevski Jul 30, 2009 3:53 PM (in response to guarf)Hi,
How do you try? -
2. Re: play WAV file with a4j:mediaoutput
guarf Jul 30, 2009 5:13 PM (in response to guarf)hi nbelaevski,
xhtml<a4j:mediaOutput element="object" session="true" createContent="#{SampleManager.play}" value="#{Sample.sample.file}" cacheable="false" width="300"/>
SampleManager backing beanpublic synchronized void play(OutputStream stream, Object object) throws IOException { stream.write((byte[])object); }
Sample persistence (called from value="#{Sample.sample.file}")public byte[] getFile() { return file; }
im not sure if im doing the right thing with this " value="#{Sample.sample.file}" " on the a4j:mediaoutput tag. And the play method from my backing bean never been called.
thanks for reply. -
3. Re: play WAV file with a4j:mediaoutput
guarf Jul 30, 2009 7:12 PM (in response to guarf)forget the last codes.
Now it works fine in Firefox, but in IE never calls the play method.
xhtml:<a4j:mediaOutput session="true" element="object" mimeType="audio/x-wav" createContent="#{SampleManager.play}" value="#{SampleManager.file.name}" cacheable="false" width="300"/>
i think the "value" isn't necesary in my case...
SampleManager:public synchronized void play (OutputStream stream, Object object) throws IOException { SessionLogger.getInstance().STDLOG("SampleManager.paint()"); stream.write(this.getFile().getData()); stream.flush(); stream.close(); }
this.getFile().getData() returns the .wav in byte[].
IE8 & Firefox 3.0.12
Richfaces 3.2.2GA -
4. Re: play WAV file with a4j:mediaoutput
facemakersc May 25, 2011 5:05 PM (in response to guarf)The same thing is happening to me!! Did you ever figure this out? Thanks!