Hi,
here at microskills we've built a simple videochat web application with
openlaszlo and it works fine. Now we have the need to record the
conversations so thought I'd simply use the mediastream's and/or
videoview's record() method - instead of broadcast()/play().
For the streams of the "local" camera and microphone this works,
although the sound is a very strange, but I can't record the "remote"
streams. The .flv files are created but have size 0.
Can anyone help me out? Thank you for your time.
Take care.
Here is the source code:
...
<!-- local streams, this works fine -->
<mediastream id="local_rec" url="${parent.user_local_rec.text}" type="rtmp">
<camera id="cam_rec" show="false"/>
</mediastream>
<mediastream id="local_mic_rec"
url="${parent.user_local_mic_rec.text}" type="rtmp">
<microphone id="micro_rec" capturing="false"/>
</mediastream>
<button text="broadcast">
<attribute name="text" value="${micro.capturing == false ? 'Broadcast'
: 'Stop'}"/>
<method event="onclick"><![CDATA[
if (micro.capturing == false) {
cam.setAttribute("show", true);
micro.setAttribute("capturing",true);
micro_rec.setAttribute("capturing",true);
local_mic_rec.record();
local_rec.record();
local_mic.broadcast();
local.stream.broadcast();
} else {
local_mic.stop();
local.stream.stop();
local_mic_rec.stop();
local_rec.stop();
micro_rec.setAttribute("capturing",false);
micro.setAttribute("capturing",false);
cam.setAttribute("show", false);
}
]]>
</method>
</button>
...
<!-- remote streams, this doesn't record -->
<!--Mostra a stream de video do outro participante no chat-->
<videoview name="remoto" bgcolor="black"
url="${parent.user_remoto.text}" type="rtmp" width="200" height="200"/>
<!--Reproduz a stream de audio do outro participante do chat-->
<mediastream name="remoto_mic"
url="${parent.user_remoto_mic.text}" type="rtmp"/>
<!--Indicar o nome do outro participante no chat-->
<edittext name="user_remoto">test</edittext>
<edittext name="user_remoto_mic">test_mic</edittext>
<edittext name="user_remoto_rec">test_rec</edittext>
<edittext name="user_remoto_mic_rec">test_mic_rec</edittext>
<view>
<simplelayout axis="x" spacing="10" />
<button text="Receive">
<method event="onclick"><![CDATA[
// parent.parent.remoto_mic.play();
// parent.parent.remoto.stream.play();
parent.parent.remoto_mic.record();
parent.parent.remoto.stream.record();
]]>
</method>
</button>
<button text="Stop">
<method event="onclick"><![CDATA[
parent.parent.remoto_mic.stop();
parent.parent.remoto.stream.stop();
]]>
</method>
</button>
</view>
</view>
...
--
Bruno Teixeira - IT Specialist
MicroSkills
Av. João Crisóstomo nº 25
Lisboa - Portugal
1050-125 Lisboa
http://www.microskills.eu
Tel (+351) 213 573 144
Fax (+351) 213 558 239
____________________________
Legal Disclaimer
This e-mail may contain privileged or confidential information and is
intended only for use by the addressee. If you are not the addressee, we
request you neither to use the contents nor disclose it in any manner to
third parties, and to inform us immediately by reply email and delete
the email from your system. The contents of this email is intended for
information purposes only. MicroSkills denies any responsibility for
damages resulting from the use of e-mail.