[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">
+&lt;canvas height=&quot;40&quot;&gt;
+    &lt;simplelayout spacing=&quot;5&quot;/&gt;
+    &lt;text text=&quot;The indidcator light is red because there is no rtmp connection.&quot;/&gt;
+    &lt;rtmpstatus/&gt;
+&lt;/canvas&gt;
+                </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>&lt;microphone&gt;</class> and <class>&lt;camera&gt;</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>&lt;mediastream&gt;</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>
+&lt;canvas&gt; 
+    &lt;simplelayout axis=&quot;y&quot; inset=&quot;10&quot; spacing=&quot;5&quot;/&gt;
+    &lt;constantlayout axis=&quot;x&quot; value=&quot;10&quot;/&gt;
+    &lt;videoview&gt;
+        &lt;mediastream id=&quot;s&quot; 
+            url=&quot;http://localhost:8080/video/test/video/videos/good-dog.flv&quot;
+            debug=&quot;true&quot;
+        /&gt;
+    &lt;/videoview&gt;
+    &lt;button
+        text=&quot;play&quot; 
+        onclick=&quot;s.play()&quot;
+    /&gt;
+    &lt;button
+        text=&quot;pause&quot; 
+        onclick=&quot;s.pause()&quot;
+    /&gt;
+    &lt;text
+        text=&quot;${&apos;playtime: &apos; + s.playtime}&quot;
+    /&gt;
+    &lt;text
+        text=&quot;${&apos;totaltime: &apos; + s.totaltime}&quot;
+    /&gt;
+    &lt;text
+        width=&quot;300&quot; 
+        multiline=&quot;true&quot;
+        &gt;
+    &lt;/text&gt;
+&lt;/canvas&gt;
+</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>&lt;microphone&gt;</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>
+    &lt;canvas&gt;
+        
+        &lt;microphone id=&quot;m&quot; 
+            capturing=&quot;${controlpanel.capturing.value}&quot;
+        /&gt;
+        
+        &lt;view
+            x=&quot;10&quot; 
+            y=&quot;20&quot; 
+            width=&quot;102&quot; 
+            height=&quot;12&quot; 
+            bgcolor=&quot;black&quot;
+            &gt;
+            &lt;view
+                x=&quot;1&quot; 
+                y=&quot;1&quot; 
+                bgcolor=&quot;yellow&quot; 
+                width=&quot;${m.level}&quot; 
+                height=&quot;10&quot;
+            /&gt;
+        &lt;/view&gt;
+        &lt;view
+            y=&quot;100&quot;
+            &gt;
+            &lt;simplelayout
+                axis=&quot;x&quot; 
+                inset=&quot;10&quot; 
+                spacing=&quot;20&quot;
+            /&gt;
+            &lt;view
+                layout=&quot;axis: y; spacing: 4&quot;
+                &gt;
+                &lt;text
+                    text=&quot;${&apos;deviceindex: &apos; + m.deviceindex}&quot; 
+                    resize=&quot;true&quot;
+                /&gt;
+                &lt;text
+                    text=&quot;${&apos;devicename: &apos; + m.devicename}&quot; 
+                    resize=&quot;true&quot;
+                /&gt;
+                &lt;text
+                    text=&quot;${&apos;capturing: &apos; + m.capturing}&quot;
+                    resize=&quot;true&quot;
+                /&gt;
+                &lt;text
+                    text=&quot;${&apos;allowed: &apos; + m.allowed}&quot;
+                    resize=&quot;true&quot;
+                /&gt;
+                &lt;text
+                    text=&quot;${&apos;level: &apos; + m.level}&quot; 
+                    resize=&quot;true&quot;
+                /&gt;
+            &lt;/view&gt;
+            &lt;view
+                width=&quot;1&quot; 
+                height=&quot;100&quot; 
+                bgcolor=&quot;black&quot;
+            /&gt;
+            &lt;view id=&quot;controlpanel&quot; 
+                layout=&quot;axis: y; spacing: 10&quot;
+                &gt;
+                &lt;checkbox name=&quot;capturing&quot;
+                    text=&quot;Capturing&quot;
+                    value=&quot;false&quot;
+                /&gt;
+                &lt;button
+                    text=&quot;Show Settings&quot;
+                    onclick=&quot;m.showSettings()&quot;
+                /&gt;
+            &lt;/view&gt;
+        &lt;/view&gt;
+                        
+   &lt;/canvas&gt;
+                    </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>&lt;videoview&gt;</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>
+ &lt;canvas&gt;
+    
+    &lt;simplelayout inset=&quot;10&quot; spacing=&quot;10&quot;/&gt;
+    &lt;rtmpconnection id=&quot;rtc&quot; 
+        src=&quot;rtmp://localhost/test&quot;
+        autoconnect=&quot;false&quot;
+        debug=&quot;true&quot;
+    /&gt;
+    &lt;view
+        layout=&quot;axis: x; spacing: 4&quot;
+        &gt;
+        &lt;rtmpstatus/&gt;
+        &lt;text
+            text=&quot;${rtc.status}&quot;
+            resize=&quot;true&quot;
+        /&gt;
+    &lt;/view&gt;
+    &lt;button
+        onclick=&quot;rtc.connect()&quot;
+        &gt;Click to Connect&lt;/button&gt;
+    
+&lt;/canvas&gt;
+</programlisting>
+            </text>
+        </doc>
 
-
     </class>
 
 



More information about the Laszlo-checkins mailing list