I had it working a long time ago but just as a proof of concept.  Kind
of busy now, but maybe I can make sense of my old code.  But just to
let you know it does work.

Here is some of my old code (I dont have time to explain it or make
sense of why I created it, it was a long time ago that I did this):


class com.gtt.core.classes.StreamingMediaPlayback extends
mx.controls.MediaPlayback
{
        var __rtmpURL : String;
        var __streamName : String;

        function set rtmpURL(ru : String) : Void
        {
        Alert.show( __rtmpURL + "/" + __streamName ); 
            __rtmpURL = ru;
            updateMedia();
        }

        function get rtmpURL() : String
        {
            return __rtmpURL;
        }

        function set streamName(sn : String) : Void
        {
        Alert.show( __rtmpURL + "/" + __streamName ); 
            __streamName = sn;
            updateMedia();
        }

        function get streamName() : String
        {
            return __streamName;
        }

        private function updateMedia()
        {
            if (__rtmpURL != null && __streamName != null)
            {
                com.gtt.core.classes.GTTAlert.show( __rtmpURL + "/" +
__streamName ); 
                setMedia(__rtmpURL + "/" + __streamName, "FLV");
            }
        }

        function createChildren() : Void
        {
            super.createChildren();
            mx.controls.streamingmedia.PlayerNetStream.prototype.play
= function (s)
            {
                super.setBufferTime(1);
                super.play(s);
            }
        }

}


If I remember right i was actually trying to mess with the bufferTime.
 So if i remember right you just need to use a proper rmtp url to
access the Media Server data.

Renaun

--- In [email protected], "Dekayd Media Inc." <[EMAIL PROTECTED]>
wrote:
>
> I have read the docs and have used the components multiple times for
playing
> progressively downloaded files.
> 
> But that was not my question.
> 
> 
> My question is: How do I use a MediaPlayback component to control an mp3
> STREAMED from Flash Media Server?
> 
> Maybe I just missed that part in the docs but I don't think so
(unless it's
> in the Flash Media Server docs)
> 
> If its not natively supported there has to be some workaround I can use.
> 
> I just don't want to figure it out on my own if someone else can
just tell
> me and save me a few days.
> 
> 
> Anyone?
> 
> 
> Thanks
> 
> -Kelly
> 
> 
> 
> 
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Renaun Erickson
> Sent: Monday, December 12, 2005 10:23 PM
> To: [email protected]
> Subject: [flexcoders] Re: Stream mp3's with Flash Media Server and Flex
> 
> The livedocs for Flex 1.5 show references of MediaPlayback,
MediaDisplay and
> MediaController.  You use them just like you would the AS v2 Components
> (Although they are not the same as the v2 components).
> 
> Renaun
> 
> --- In [email protected], "Dekayd Media Inc." <[EMAIL PROTECTED]>
> wrote:
> >
> > Yea I got it to play that way but I don't really want to write my
> own set of
> > controls to handle play and stop.
> > 
> >  
> > 
> > There must be a way to do it with the MediaPlayback control I just 
> > can't figure out what it is.
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > Anyone else have any suggestions?
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> >   _____
> > 
> > From: [email protected] [mailto:[EMAIL PROTECTED] 
> > On Behalf Of JesterXL
> > Sent: Monday, December 12, 2005 10:00 AM
> > To: [email protected]
> > Subject: Re: [flexcoders] Stream mp3's with Flash Media Server and 
> > Flex
> > 
> >  
> > 
> > I don't know how you do it in the MediaPlayback component, but
> playing it
> > via a NetStream is just as simple as:
> > 
> >  
> > 
> > nc = new NetConnection();
> > 
> > nc.connect("rtmp://yourserver/app");
> > 
> > nc["owner"] = this;
> > 
> > nc.onStatus = function(o)
> > 
> > {
> > 
> >     if(o.code == "NetConnection.Connect.Success")
> > 
> >     {
> > 
> >         this.owner.playMP3();
> > 
> >     }
> > 
> > }
> > 
> >  
> > 
> > function playMP3()
> > 
> > {
> > 
> >     myns = new NetStream(nc);
> > 
> >     myns.play("some.mp3");
> > 
> > }
> > 
> > ...so, maybe you have to issue a play("some.mp3")?  Not sure of the
> methods
> > of that component.
> > 
> >  
> > 
> > ----- Original Message -----
> > 
> > From: Dekayd Media <mailto:[EMAIL PROTECTED]>  Inc. 
> > 
> > To: [email protected]
> > 
> > Sent: Monday, December 12, 2005 12:48 AM
> > 
> > Subject: [flexcoders] Stream mp3's with Flash Media Server and Flex
> > 
> >  
> > 
> > I want to use a MediaPlayback component to play an mp3 using Flash 
> > Media Server in Flex.
> > 
> >  
> > 
> > I can successfully connect to my FMS application but I don't have
> any idea
> > how to make an mp3 play in Flex after connecting.
> > 
> >  
> > 
> >  
> > 
> > I haven't really been able to find a good explanation anywhere
> online or in
> > the docs.
> > 
> >  
> > 
> >  
> > 
> > Any help would be greatly appreciated.
> > 
> >  
> > 
> >  
> > 
> > Thanks
> > 
> >  
> > 
> > Kelly Roman
> > 
> > Dekayd Media Inc.
> > 
> > [EMAIL PROTECTED]
> > 
> > www.dekaydmedia.com
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > 
> > 
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> > 
> > 
> > 
> > 
> >   _____
> > 
> > YAHOO! GROUPS LINKS
> > 
> >  
> > 
> > *    Visit your group "flexcoders
> > <http://groups.yahoo.com/group/flexcoders> " on the web.
> >   
> > *    To unsubscribe from this group, send an email to:
> >  [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>
> >   
> > *    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> > <http://docs.yahoo.com/info/terms/> . 
> > 
> >  
> > 
> >   _____
> >
> 
> 
> 
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor
--------------------~--> Get
> Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
> http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/nhFolB/TM
> --------------------------------------------------------------------~-> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to