Skip to main content
January 21, 2009
Question

detect live stream

  • January 21, 2009
  • 1 reply
  • 651 views
Can somebody please answer this question to me:

With the Flash Media Streaming Server (not the interactive version), is it possible to detect if a live stream is running?

I want to show an overview of several live streams on one page.
The ones that are not running should show as "offline". The others should show an online thumbnail.
I don't want the visitors to have to go to all of the pages only to see that the stream is offline.
    This topic has been closed for replies.

    1 reply

    Known Participant
    October 23, 2009

    Hmmm...  I've been searching for an answer to this too.  Want to put a "Not Broadcasting" swf up there when not streaming but FMS doesn't give the necessary messages.  Would think this would be a pretty standard thing to want to do.

    Here are the messages FMS 3.5 fires when I pull up my client app and start and stop my encoder a few times:

    NetStream.Play.Reset (Playing and resetting stream)
    NetStream.Play.Start (Started playing stream)
    NetStream.Play.PublishNotify (stream is now published)
    NetStream.Buffer.Full
    NetStream.Buffer.Empty (15 secs or so after stopping the encoder)
    NetStream.Buffer.Full (15 secs or so after starting the encoder)
    NetStream.Buffer.Empty
    and so on...

    FMS should broadcast messages to the effect "Stream stopped" and "Stream started".

    There are so many other messages broadcast.  Wonder why these aren't implemented?

    October 23, 2009

    There are a couple of ways you can do it:

    1. Use the application.onPublish and application.onUnpublish methods to keep track of when publising starts and stops.

    2. Use the admin service. See the docs for the getLiveStreams method.

    *edit*

    Whoops... didn't initially notice that the OP mentioned FMSS. Neither of my solutions will work with FMSS... just FMIS