[Red5] selecting playback from html?

David Foley solutions at ondevice.ie
Sun Mar 16 11:28:39 PST 2008


Hi Gleb,

I just reread your first post - I'm afraid to say that the information I
provided you will not suit what you have in mind. Those flash control
methods control the flash player, and only indirectly a movie or other
object that it contains (for example, a video instance residing on the stage
of a movie). If you could post a little more on what you're trying to
achieve, I may be able to help you further, but in brief -

if you had a frame-based flash animation, the methods I pointed out to you
would be suitable for controlling how that flash movie plays back frames. (
e.g. jumping to (seeking), rewinding, stopping etc...), but assuming you are
aiming to achieve the ability to seek to a particular part in a stream (that
is, an mp3 or flv) using DOM and JavaScript, you will have to develop a more
advanced flash application first, and then expose methods of your choosing
(and likely your own authoring) to the external interface. Once those
methods are available 'on' the external interface of that a particular
embedded swf, then you can call them on the DOM element that represents that
swf (eg. the embed element).

If you are new to both flash and red5, I recommend you get to grips with
what needs to be in flash before attempting to develop a red5 application -
I'm really sorry if I gave you false hope earlier - my fault - I read the
post too quickly. Though it would be *possible* to build a flash client that
does what you want (ie. can stream and can be controlled using those
predefined methods, using SetVariable and GetVariable for input and output,
and goToFrame to put the player in different states ('modes')), it would be
incredibly inefficient and a right PIA. Forget about it.

If its any consolation, controlling any aspect of a flash movie from
actionscript is entirely possible, once those methods have beed defined on
external interface first.If I were you, I would temporarily forget about
red5, get to grips with the basics of flash remoting / video / streaming /
application architecture, and finally external interface before developing a
red5 flash application to service that flash client. Once you got the client
down, then take a look at the server side of things. Once you get a picture
of how the two relate to one another, you'll be in a much better position.
(Think about it, Flash Media Server users never get a chance to see what
goes on behind the scenes!)

I'm shooting in the dark here, but two introductary books which may interest
you are *Hands on guide to Flash Video* (Focal Press) and *Essential
ActionScript* 3.0 by Colin Moock to get a feel for the groundwork. There are
loads of straight forward tutorials on at Adobes Flash Developer Connection
(http://www.adobe.com/devnet/flash/), and you can always look through the
flash source code on any of the samples that ship with red5 (anything with a
.as or .fla extension) for a point of reference (though some of them may be
slightly out of date IMHO).

I hope thats some help

Best

David


On Sun, Mar 16, 2008 at 2:48 PM, Gleb Rybkin <grybkin at gmail.com> wrote:

> David,
>
> This is great! Thank you! Is it possible to switch to a certain movie
> part? say, myFlashMovie.Rewind(234.55)?
>
> Best regards,
> Gleb.
>
> On Sun, Mar 16, 2008 at 9:35 AM, David Foley <solutions at ondevice.ie>
> wrote:
>
> > Hi gleb,
> >
> > there are actually some predefined functions javascript functions
> > available to you without having to use ExternalInterface (usefull as it is
> > for advanced Javascript / Flash communication) - read this article<http://www.phillipkerman.com/ff2000sf/muj_reprint.pdf>for an overview - in general, you look up the flash movie in the Dom, and
> > then address these predefined methods by calling on the element. For example
> > if you embed your flash movie like below (firefox/opera only - IE has its
> > own way)
> >
> > <embed name="myFlashMovie" type="application/x-shockwave-flash" src ="
> > wwww.mystie.com/myassets/meFlashMove.swf" width ="500" height="500">
> > </embed>
> >
> > you can look up the element like this :
> >
> > var myFlashMovie = window.myFlashMovie || document.myFlashMovie;
> >
> > and call methods like this
> >
> > if(myFlashMovie.PercentLoaded() == 100)
> > {
> >     myFlashMovie.Play(); //
> >     // more commands
> > }
> >
> > Best,
> >
> > David
> >
> >
> > On Sun, Mar 16, 2008 at 3:33 AM, Gleb Rybkin <grybkin at gmail.com> wrote:
> >
> > > Walter,
> > >
> > > Thank you! externalinterface seems to be exactly what I need for
> > > html/actionsript interaction! How do I rewind a recorded video inside
> > > actionscript, though? Is there a function to rewind to time X in the video?
> > > Thanks, Gleb.
> > >
> > >
> > >
> > >   On Sat, Mar 15, 2008 at 9:45 PM, Walter Tak <walter at waltertak.com>
> > > wrote:
> > >
> > > >   Have javascript call an exposed function in the flash movie/swf.
> > > > Check out 'externalinterface' for more info in the Flash help.
> > > >
> > > > Regards,
> > > > Walter
> > > >
> > > >
> > > > ----- Original Message -----
> > > > *From:* Gleb Rybkin <grybkin at gmail.com>
> > > > *To:* red5 at osflash.org
> > > > *Sent:* Sunday, 16 March 2008 01:57
> > > > *Subject:* [Red5] selecting playback from html?
> > > >
> > > > New to both flash and red5, so sorry if this is trivial. I'm
> > > > experimenting with a video conferencing solution and would like to be able
> > > > to allow users to skip some parts of a recorded video and jump to what they
> > > > want to see, from html/javascript, based on certain database conditions. Any
> > > > hints on how to implement this? Thanks, Gleb.
> > > >
> > > > Also, is there a standard whiteboard implementation for red5?
> > > > Opensource, etc? Thanks again.
> > > >
> > > >
> > > > _______________________________________________
> > > > Red5 mailing list
> > > > Red5 at osflash.org
> > > > http://osflash.org/mailman/listinfo/red5_osflash.org
> > > >
> > > >
> > >
> > > _______________________________________________
> > > Red5 mailing list
> > > Red5 at osflash.org
> > > http://osflash.org/mailman/listinfo/red5_osflash.org
> > >
> > >
> >
> > _______________________________________________
> > Red5 mailing list
> > Red5 at osflash.org
> > http://osflash.org/mailman/listinfo/red5_osflash.org
> >
> >
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20080316/d165afe0/attachment.html 


More information about the Red5 mailing list