[Laszlo-checkins] r8976 - in openlaszlo/trunk/lps/components: av extensions/av
lou@openlaszlo.org
lou at openlaszlo.org
Fri May 2 07:58:37 PDT 2008
Author: lou
Date: 2008-05-02 07:57:56 -0700 (Fri, 02 May 2008)
New Revision: 8976
Modified:
openlaszlo/trunk/lps/components/av/rtmpstatus.lzx
openlaszlo/trunk/lps/components/extensions/av/camera.lzx
openlaszlo/trunk/lps/components/extensions/av/mediadevice.lzx
openlaszlo/trunk/lps/components/extensions/av/mediastream.lzx
openlaszlo/trunk/lps/components/extensions/av/microphone.lzx
openlaszlo/trunk/lps/components/extensions/av/rtmpconnection.lzx
Log:
Change 20080502-lou-5 by lou at loumac.local on 2008-05-02 10:47:34 AST
in /Users/lou/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Add intro paragraphs and code examples from 3.4 to Audio and Video reference pages
Bugs Fixed: LPP-5824, LPP-5826, LPP-5827, LPP-5828, LPP-5829, LPP-5825 (partial)
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Tests: visual verify
Modified: openlaszlo/trunk/lps/components/av/rtmpstatus.lzx
===================================================================
--- openlaszlo/trunk/lps/components/av/rtmpstatus.lzx 2008-05-02 14:55:20 UTC (rev 8975)
+++ openlaszlo/trunk/lps/components/av/rtmpstatus.lzx 2008-05-02 14:57:56 UTC (rev 8976)
@@ -48,8 +48,28 @@
this.setAttribute('frame', this.rtmpc.stage + 1);
]]>
</method>
+ <doc>
+ <tag name="shortdesc">
+ <text>An indicator "light" that shows status of connection to a media server.</text>
+ </tag>
+ <text>
+ <p>
+ This element causes a small indicator "light" to show the status of the connection:</p>
+ <itemizedlist>
+ <listitem><para>red: no connection</para></listitem>
+ <listitem><para>green: working connection</para></listitem>
+ </itemizedlist>
+ <p>The following example shows a trivial rtmpstatus example.</p>
+ <example class="program">
+<canvas height="40">
+ <simplelayout spacing="5"/>
+ <text text="The indidcator light is red because there is no rtmp connection."/>
+ <rtmpstatus/>
+</canvas>
+ </example>
+ </text>
+ </doc>
-
</class>
Modified: openlaszlo/trunk/lps/components/extensions/av/camera.lzx
===================================================================
--- openlaszlo/trunk/lps/components/extensions/av/camera.lzx 2008-05-02 14:55:20 UTC (rev 8975)
+++ openlaszlo/trunk/lps/components/extensions/av/camera.lzx 2008-05-02 14:57:56 UTC (rev 8976)
@@ -282,14 +282,13 @@
<doc>
<tag name="shortdesc"><text>A camera that can be connected to a rtmpserver.</text></tag>
<text>
- <p>In order to use a camera in an LZX application, the <attribute>visible</attribute> and <attribute>allowed</attribute> attributes must be set to true. The <attribute>visible</attribute> indicates the program's intent and the <attribute>allowed</attribute> attribute indicates the user's permission. To protect privacy, camera operation must be explicitly approved by the user.</p>
+ <p>In order to use a camera in an LZX application, the <attribute>visible</attribute> and <attribute>allowed</attribute> attributes must be set to <attribute>true</attribute>. The <attribute>visible</attribute> indicates the program's intent and the <attribute>allowed</attribute> attribute indicates the user's permission. To protect privacy, camera operation must be explicitly approved by the user.</p>
<programlisting>
- <![CDATA[<canvas height="100">
- <camera id="rtc" src="rtmp://localhost/test" autoconnect="false"/>
- <text text="${rtc.status}"/>
- <button onclick="rtc.connect()">Click to Connect</button>
- </canvas>]]>
- </programlisting>
+ <![CDATA[<canvas height="100">
+ <camera id="rtc" src="rtmp://localhost/test" autoconnect="false"/>
+ <text text="${rtc.status}"/>
+ <button onclick="rtc.connect()">Click to Connect</button>
+ </canvas>]]></programlisting>
</text>
</doc>
</class>
Modified: openlaszlo/trunk/lps/components/extensions/av/mediadevice.lzx
===================================================================
--- openlaszlo/trunk/lps/components/extensions/av/mediadevice.lzx 2008-05-02 14:55:20 UTC (rev 8975)
+++ openlaszlo/trunk/lps/components/extensions/av/mediadevice.lzx 2008-05-02 14:57:56 UTC (rev 8976)
@@ -1,5 +1,5 @@
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2006-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
@@ -423,8 +423,15 @@
this.setAttribute("active", active);
]]>
</method>
+ <doc>
+ <tag name="shortdesc">
+ <text>The base class for media devices.</text>
+ </tag>
+ <text>
+ <p>As of OpenLaszlo release 4.0, subclasses of this class are <class><microphone></class> and <class><camera></class>.</p>
+ </text>
+ </doc>
-
</class>
Modified: openlaszlo/trunk/lps/components/extensions/av/mediastream.lzx
===================================================================
--- openlaszlo/trunk/lps/components/extensions/av/mediastream.lzx 2008-05-02 14:55:20 UTC (rev 8975)
+++ openlaszlo/trunk/lps/components/extensions/av/mediastream.lzx 2008-05-02 14:57:56 UTC (rev 8976)
@@ -1110,7 +1110,49 @@
]]>
</method>
-
+ <doc>
+ <tag name="shortdesc">
+ <text>A connection to an RTMP server.</text>
+ </tag>
+ <text>
+ <p>A <class><mediastream></class> opens a connection for recieving streaming media.</p>
+
+ <note><para>Total time is only defined for FLV's delivered over http if they have "metaData" defined, and we don't know the stream length until it starts playing.</para></note>
+ <p>The following example shows a media stream.</p>
+<programlisting>
+<canvas>
+ <simplelayout axis="y" inset="10" spacing="5"/>
+ <constantlayout axis="x" value="10"/>
+ <videoview>
+ <mediastream id="s"
+ url="http://localhost:8080/video/test/video/videos/good-dog.flv"
+ debug="true"
+ />
+ </videoview>
+ <button
+ text="play"
+ onclick="s.play()"
+ />
+ <button
+ text="pause"
+ onclick="s.pause()"
+ />
+ <text
+ text="${'playtime: ' + s.playtime}"
+ />
+ <text
+ text="${'totaltime: ' + s.totaltime}"
+ />
+ <text
+ width="300"
+ multiline="true"
+ >
+ </text>
+</canvas>
+</programlisting>
+
+ </text>
+ </doc>
</class>
Modified: openlaszlo/trunk/lps/components/extensions/av/microphone.lzx
===================================================================
--- openlaszlo/trunk/lps/components/extensions/av/microphone.lzx 2008-05-02 14:55:20 UTC (rev 8975)
+++ openlaszlo/trunk/lps/components/extensions/av/microphone.lzx 2008-05-02 14:57:56 UTC (rev 8976)
@@ -1,5 +1,5 @@
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2006-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
@@ -194,8 +194,91 @@
}
]]>
</method>
+ <doc>
+ <tag name="shortdesc">
+ <text>A microphone connection to a media server.</text>
+ </tag>
+ <text>
+ <p>The <class><microphone></class> element allows you to set up and control a microphone that is connected to a media server. For privacy protection, the <attribute>allowed</attribute> attribute must be set to <attribute>true</attribute> by the user.</p>
+ <p>The following figure shows a microphone control.</p>
+ <programlisting>
+ <canvas>
+
+ <microphone id="m"
+ capturing="${controlpanel.capturing.value}"
+ />
+
+ <view
+ x="10"
+ y="20"
+ width="102"
+ height="12"
+ bgcolor="black"
+ >
+ <view
+ x="1"
+ y="1"
+ bgcolor="yellow"
+ width="${m.level}"
+ height="10"
+ />
+ </view>
+ <view
+ y="100"
+ >
+ <simplelayout
+ axis="x"
+ inset="10"
+ spacing="20"
+ />
+ <view
+ layout="axis: y; spacing: 4"
+ >
+ <text
+ text="${'deviceindex: ' + m.deviceindex}"
+ resize="true"
+ />
+ <text
+ text="${'devicename: ' + m.devicename}"
+ resize="true"
+ />
+ <text
+ text="${'capturing: ' + m.capturing}"
+ resize="true"
+ />
+ <text
+ text="${'allowed: ' + m.allowed}"
+ resize="true"
+ />
+ <text
+ text="${'level: ' + m.level}"
+ resize="true"
+ />
+ </view>
+ <view
+ width="1"
+ height="100"
+ bgcolor="black"
+ />
+ <view id="controlpanel"
+ layout="axis: y; spacing: 10"
+ >
+ <checkbox name="capturing"
+ text="Capturing"
+ value="false"
+ />
+ <button
+ text="Show Settings"
+ onclick="m.showSettings()"
+ />
+ </view>
+ </view>
+
+ </canvas>
+ </programlisting>
+ </text>
+ </doc>
-
</class>
Modified: openlaszlo/trunk/lps/components/extensions/av/rtmpconnection.lzx
===================================================================
--- openlaszlo/trunk/lps/components/extensions/av/rtmpconnection.lzx 2008-05-02 14:55:20 UTC (rev 8975)
+++ openlaszlo/trunk/lps/components/extensions/av/rtmpconnection.lzx 2008-05-02 14:57:56 UTC (rev 8976)
@@ -5,12 +5,7 @@
<library>
-
-
- <!---
- RTMP connection.
- @todo document
- -->
+
<class name="rtmpconnection" extends="node">
@@ -238,8 +233,41 @@
]]>
</method>
+ <doc>
+ <tag name="shortdesc">
+ <text>A connection to an RTMP server.</text>
+ </tag>
+ <text>
+ <p>An <class>rtmpconnection</class> represents a connection to an RTMP server, such as the Flash Media Server or Red5, enabling two-way streaming audio/video. This allows you to broadcast and receive live audio and/or video, as well as recording video from a webcam or audio from a microphone to files on the server. Recorded files may be played back over http (using <class>stream</class> and <class><videoview></class> classes) or with RTMP to allow seeking within and playback of long files that are impractical to load into memory.</p>
+ <p>The following example shows a simple RTMP connection.</p>
+
+<programlisting>
+ <canvas>
+
+ <simplelayout inset="10" spacing="10"/>
+ <rtmpconnection id="rtc"
+ src="rtmp://localhost/test"
+ autoconnect="false"
+ debug="true"
+ />
+ <view
+ layout="axis: x; spacing: 4"
+ >
+ <rtmpstatus/>
+ <text
+ text="${rtc.status}"
+ resize="true"
+ />
+ </view>
+ <button
+ onclick="rtc.connect()"
+ >Click to Connect</button>
+
+</canvas>
+</programlisting>
+ </text>
+ </doc>
-
</class>
More information about the Laszlo-checkins
mailing list