I everybody !
i'm very new to red5 developpement, sorry if my question could be stupid :-)
I have to develop a videoconférence/chat/présence application. I'm
starting with a simple prototype using fitcDemo to learn.
i wrote a little openlaszlo script :
====================================================================================================
/
<?xml version="1.0" encoding="UTF-8" ?>
<canvas bgcolor="0x90ff80" debug="true" title="video conf proto 1">
<simplelayout spacing="5"/>
<text text="Red5 connection status: "/>
<rtmpstatus/>
<mediastream name="s1"
type="rtmp"
/>
<mediastream name="s2"
type="rtmp"
/>
<checkbox onvalue="s1.setAttribute('muteaudio', value)">Mute
Audio</checkbox>
<checkbox onvalue="s1.setAttribute('mutevideo', value)">Mute
Video</checkbox>
<rtmpconnection name="rtc" id="rtc"
src="rtmp://samarium.inrialpes.fr/fitcDemo"
autoconnect="false"
debug="true">
<netremotecall name="getStreams">
<attribute name="funcname" value="getStreams" />
<method name="onResult" args="value">
<![CDATA[
Debug.write("getStream", this, "onResult", value);
]]>
</method>
</netremotecall>
<netremotecall name="streamPublishStart">
<attribute name="funcname" value="streamPublishStart" />
<method name="onResult" args="value">
<![CDATA[
Debug.write("streamPublishStart", this, "onResult", value);
]]>
</method>
</netremotecall>
</rtmpconnection>
<button name="gogo">GoGo
<method event="onclick">
Debug.write("call getstreams ... ");
var para = new Array();
<!-- para[0] = rtc;
para[1] = 1; -->
canvas.rtc.getStreams.call();
</method>
</button>
<button text="Connexion" >
<method event="onclick">
Debug.write("remotecall");
<!-- <![CDATA[ -->
if(rtc.stage == false){
rtc.connect();
} else {<!-- rtc.stage = false; -->}
<!-- ]]> -->
</method>
</button>
<!-- ==================== CAM DISTANTE ============================ -->
<button onclick="camDist.toggleCam();" text="Afficher cam distante" />
<window id="camDist" title="camera distante" bgcolor="0xff83ad"
height="300" width="300" closeable="true" resizable="true" opacity="0.7"
align="center" x="30" y="30">
<view>
<simplelayout spacing="5" />
<videoview name="vid"
type="rtmp"
stream="$once{canvas.s2}"
/>
<!-- stream="$once{canvas.s2}" -->
<!-- <edittext name="username">Distant</edittext> -->
<button>
<!-- -->
<attribute name="text" value="${s2.playing ? 'stop
receiving' : 'receive'}"/>
<method event="onclick"><![CDATA[
s2.setAttribute('url', 'USER2');
if (s2.playing) s2.stop(); else s2.play();
this.setAttribute('text', "lalalla");
]]></method>
</button>
</view>
<method name="toggleCam">
if(this.enabled){camDist.close();this.enabled=false;}else{camDist.open();this.enabled=true;}
</method>
</window>
<!-- ==================== RETOUR ET PUBLICATION CAM LOCALE
============================ -->
<button onclick="camLoc.toggleCam();" text="Afficher le retour cam" />
<window id="camLoc" title="camera locale" bgcolor="0xff83ad"
height="300" width="300" closeable="true" resizable="true" opacity="0.7"
x="200" y="200">
<view>
<simplelayout spacing="5"/>
<videoview id="live" type="rtmp" stream="$once{canvas.s1}">
<camera id="cam" show="false"/>
<microphone id="mic" capturing="false"/>
</videoview>
<edittext name="username">USER2</edittext>
<!--live.stream.broadcast();-->
<button text="broadcast">
<attribute name="text" value="${(s1.broadcasting ==
false) ? 'broadcast' : 'stop broadcasting'}" />
<method event="onclick"><![CDATA[
if (cam.show == false) {
live.stream.setAttribute('url',
parent.username.text);
Debug.write("call streamPublishStart ... ");
var para = new Array();
para[0] = s1;
canvas.rtc.streamPublishStart.call(para);
cam.setAttribute('show', true);
} else {
live.stream.stop();
cam.setAttribute('show', false);
}
]]>
</method>
</button>
</view>
<method name="toggleCam">
if(this.enabled){camLoc.close();this.enabled=false;}else{camLoc.open();this.enabled=true;}
</method>
</window>
<debug y="130" width="180" height="240" />
</canvas>
/====================================================================================================
/
Here is my problems
/
1)
i change log4j of red5 to see some debug infos and i get this when i get
connected to red (connexion button) :
[ERROR] 648551 SocketAcceptorIoProcessor-0.0:(
org.red5.server.service.ServiceInvoker.error ) Method getLength not
found in [EMAIL PROTECTED]
and i can't find where getLength is called ...
2) globally i don't understand what laszlo script call on red5 server
when this button is triggered (this is sample code :-) ) :
/<button text="Connexion" >
<method event="onclick">
Debug.write("remotecall");
<!-- <![CDATA[ -->
if(rtc.stage == false){
rtc.connect();
} else {<!-- rtc.stage = false; -->}
<!-- ]]> -->
</method>
</button>
what does <rtmpconnection>.connect exactly ???
/
3)
has i said, i'm very new to red5 developpement.
I did'nt found so much info about fitcdemo usage (except AS source but i
don't know so much about AS). Do somebody have info about the way to
create "rooms" and manage streams (avaible streams discovery at startup)
??? Could someone knowing openlaszlo have docs, tutorial or sample ?
thanks by advance and sorry for my english
Pierre
[EMAIL PROTECTED]
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org