[Laszlo-dev] [Laszlo-checkins] r13068 - openlaszlo/branches/pagan-deities/lps/components/extensions/av

Max Carlson max at openlaszlo.org
Thu Feb 26 06:22:00 PST 2009


I already kicked one off...

P T Withington wrote:
> There will be a pagan build started automatically at 6:35PST that will 
> include this.
> 
> On 2009-02-26, at 02:05EST, max at openlaszlo.org wrote:
> 
>> Author: max
>> Date: 2009-02-25 23:05:46 -0800 (Wed, 25 Feb 2009)
>> New Revision: 13068
>>
>> Modified:
>>   
>> openlaszlo/branches/pagan-deities/lps/components/extensions/av/mediastream.lzx 
>>
>>   
>> openlaszlo/branches/pagan-deities/lps/components/extensions/av/rtmpconnection.lzx 
>>
>> Log:
>> Change 20090225-maxcarlson-o by maxcarlson at Bank.lan on 2009-02-25 
>> 22:56:54 PST
>>    in /Users/maxcarlson/openlaszlo/pagan-deities
>>    for http://svn.openlaszlo.org/openlaszlo/branches/pagan-deities
>>
>> Summary: Recreate mediastreams after initial rtmp connection fails
>>
>> Bugs Fixed: LPP-7821 - Mediastream should re-initialize when the first 
>> rtmpconnection attempt fails
>>
>> Technical Reviewer: promanik
>> QA Reviewer: bkumar at laszlosystems.com
>> Doc Reviewer: sallen
>>
>> Details: mediastream - Listen for on_nc events on rtmpconnections to 
>> handle recreated streams.  Call _handleAutoplay() onconnect of the 
>> stream.
>>
>> rtmpconnection - Send on_nc event when the connection is recreated.  
>> Close connections when an arror occurs.
>>
>> Tests: See LPP-7821 for a testcase.  Updated testcase from 
>> http://jira.openlaszlo.org/jira/browse/LPP-7708 allows 
>> recording/playback when initial connection fails, e.g <rtmpconnection 
>> altsrc="rtmp://localhost:1935/voicemail" 
>> src="rtmpt://localhost:8822/voicemail" name="rtmp" debug="true" 
>> connectiontimeout="3000"/>
>>
>>
>>
>> Modified: 
>> openlaszlo/branches/pagan-deities/lps/components/extensions/av/mediastream.lzx 
>>
>> ===================================================================
>> --- 
>> openlaszlo/branches/pagan-deities/lps/components/extensions/av/mediastream.lzx    
>> 2009-02-26 07:04:27 UTC (rev 13067)
>> +++ 
>> openlaszlo/branches/pagan-deities/lps/components/extensions/av/mediastream.lzx    
>> 2009-02-26 07:05:46 UTC (rev 13068)
>> @@ -328,9 +328,16 @@
>>                     // If we don't define our own connection, then use
>>                     // the default one (the first rtmpconnection 
>> created).
>>                     //Debug.write("_findnc type rtmp, rtmpconnection", 
>> this.rtmpconnection, "_nc", 
>> global.rtmpconnection.prototype._default._nc);
>> -                    this._nc =
>> -                        this.rtmp ||
>> -                        global.rtmpconnection.prototype._default._nc;
>> +                    if (this.rtmp) {
>> +                        this._nc = this.rtmp;
>> +                    } else {
>> +                        var defaultc = 
>> global.rtmpconnection.prototype._default;
>> +                        this._nc = defaultc._nc;
>> +                        // register for connection
>> +                        new LzDelegate(this, '_handleAutoplay', 
>> defaultc, 'onconnect');
>> +                        // register for reconnection
>> +                        new LzDelegate(this, '_recreateStream', 
>> defaultc, 'on_nc');
>> +                    }
>>                     break;
>>                 }
>>
>> @@ -349,6 +356,13 @@
>>           ]]>
>>         </method>
>>
>> +        <!--- Recreate a stream that was destroyed
>> +              @keywords private -->
>> +        <method name="_recreateStream"><![CDATA[
>> +            this._nc = global.rtmpconnection.prototype._default._nc;
>> +            this._flashstream = null;
>> +        ]]>
>> +        </method>
>>
>>         <!--- Delete the Flash NetConnection object.
>>               @keywords private -->
>>
>> Modified: 
>> openlaszlo/branches/pagan-deities/lps/components/extensions/av/rtmpconnection.lzx 
>>
>> ===================================================================
>> --- 
>> openlaszlo/branches/pagan-deities/lps/components/extensions/av/rtmpconnection.lzx    
>> 2009-02-26 07:04:27 UTC (rev 13067)
>> +++ 
>> openlaszlo/branches/pagan-deities/lps/components/extensions/av/rtmpconnection.lzx    
>> 2009-02-26 07:05:46 UTC (rev 13068)
>> @@ -104,7 +104,7 @@
>>         <!--- Create connection
>>               @keywords private -->
>>         <method name="_createconnection"><![CDATA[
>> -            this._nc = new NetConnection();
>> +            this.setAttribute('_nc', new NetConnection());
>>
>>             var t = this;
>>             this._nc.onStatus = function(info) {
>> @@ -166,6 +166,7 @@
>>         <!--- Handle connection failure, attempt to reconnect using 
>> altsrc
>>               @keywords private -->
>>         <method name="_handleConnectionFailure" args="msg"><![CDATA[
>> +            this._nc.close();
>>             if (this.debug) {
>>                 if ($debug) Debug.warn("error connecting to", 
>> this._connecturl, ":", msg);
>>             }
>>
>>
>> _______________________________________________
>> Laszlo-checkins mailing list
>> Laszlo-checkins at openlaszlo.org
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins
> 

-- 
Regards,
Max Carlson
OpenLaszlo.org


More information about the Laszlo-dev mailing list