[Red5] Stream Events Playlist
Tom Krcha
tomkrcha at gmail.com
Mon Feb 19 21:26:23 EST 2007
I think I will use some timers, which will detect which stream is now
played.
But I would prefer event automatization.
Problem is that by stopping SimplePlayItem ServerStream Playlist isnt called
streamPlaylistItemStop()
And there is also no event indicating changing streams in Playlist.
serverStream.getCurrentItem().getName() ... this returns
"Spiderman3_trailer_300" or "on2_flash8_w_audio" .. depending on what is
played right now.
I would prefer to implement there streamPlaylistItemChange() - when item in
playlist changed to another
and also streamPlaylistItemFinished()
Thanks
Tom
2007/2/20, Dan Rossi <spam at electroteque.org>:
>
> Im assuming you are adding this aswell :)
>
> serverStream.addItem(item);
>
> Server side playlists has never worked for me. The player however knows
> when the playlist is switching because it will buffer each time it
> switches ! Id prefer a smooth fade to black sequence between each item
> without buffering.
>
> Tom Krcha wrote:
> > for sure I have tried also:
> >
> > serverStream.setRepeat(false);
> > serverStream.setRandom(false);
> >
> > and the same end. There is never called streamPlaylistItemStop.
> >
> > T.
> >
> > 2007/2/20, Tom Krcha <tomkrcha at gmail.com>:
> >>
> >> Sorrie,
> >>
> >> I was wrong.
> >>
> >> But anyway, it doesnt work how I would like to.
> >>
> >> streamPlaylistItemStop or streamPlaylistItemPlay isn't called while
> item
> >> changes.
> >>
> >> According to the example:
> >>
> >> SimplePlayItem item = new SimplePlayItem();
> >> item.setName ("Spiderman3_trailer_300");
> >>
> >> SimplePlayItem item2 = new SimplePlayItem();
> >> item2.setName("on2_flash8_w_audio");
> >>
> >> which method is called when Spiderman3_trailer_300 finished and
> >> on2_flash8_w_audio
> >> is started in one Live stream?
> >>
> >> Thanks
> >>
> >> Tom
> >>
> >> 2007/2/20, Tom Krcha < tomkrcha at gmail.com>:
> >> >
> >> > Hi Dan,
> >> >
> >> > these are cool, but they do not solve my problem.
> >> >
> >> > These are for client. That means, when client starts play an item -
> >> it's
> >> > called streamPlaylistItemPlay.
> >> > When client stops playing playlist item -> streamPlaylistItemStop
> >> >
> >> > But I have to know, when playlist changes item and also when playlist
> >> > stops playing.
> >> >
> >> > I was trying to find such methods in whole API, but i was
> >> unsuccessful.
> >> >
> >> > Thanks for proposals.
> >> >
> >> > Tom
> >> >
> >> > 2007/2/20, Dan Rossi <spam at electroteque.org>:
> >> > >
> >> > > Hi they are handled in the stream aware handler methods. The server
> >> > > side
> >> > > streaming isnt working properly, repeating will cut the clip off 10
> >> > > seconds before its suppose to end then stuff the timecode for the
> >> rest
> >> > > of the playlists after that.
> >> > >
> >> > > public void streamPlaylistItemPlay(IPlaylistSubscriberStream
> stream,
> >> > > IPlayItem item, boolean isLive) {
> >> > >
> >> > > }
> >> > >
> >> > > public void streamPlaylistItemStop(IPlaylistSubscriberStream
> >> > > stream,
> >> > > IPlayItem item) {
> >> > >
> >> > > }
> >> > >
> >> > > these ones ?
> >> > >
> >> > > Tom Krcha wrote:
> >> > > > Hi,
> >> > > >
> >> > > > I have just made a playlist for TV style streaming, but I dont
> >> know
> >> > > > how to
> >> > > > handle events of this playlist.
> >> > > >
> >> > > > I wrote it like this:
> >> > > >
> >> > > > IServerStream serverStream = StreamUtils.createServerStream(room,
> >> > > "tv");
> >> > > >
> >> > > > SimplePlayItem item = new SimplePlayItem();
> >> > > > item.setName ("Spiderman3_trailer_300");
> >> > > >
> >> > > > SimplePlayItem item2 = new SimplePlayItem();
> >> > > > item2.setName("on2_flash8_w_audio");
> >> > > >
> >> > > > serverStream.addItem(item);
> >> > > > serverStream.addItem(item2);
> >> > > >
> >> > > > serverStream.start();
> >> > > > serverStream.setRepeat(true);
> >> > > >
> >> > > > But I need to know, when another item starts and when playlist
> >> > > finished
> >> > > > playing. which enables me to load another playlist.
> >> > > >
> >> > > > So, how to handle ServerStream events?
> >> > > >
> >> > > > Thanks
> >> > > >
> >> > > > Tom
> >> > > >
> >> > > >
> >> > >
> >>
> ------------------------------------------------------------------------
> >> > > >
> >> > > > _______________________________________________
> >> > > > 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/20070220/afb86f61/attachment.htm
More information about the Red5
mailing list