Skip to main content
December 2, 2010
Question

How to check whether a stream a live or recorded video in FMS?

  • December 2, 2010
  • 1 reply
  • 644 views

I don't find such API to indicate whether a stream is live or not.

Anyone knows how to judge this,either by client side or server side actionscript?

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    December 2, 2010

    Where exactly you want to know about the stream type and what is the reason behind it - i mean for what reason do you want to know whether its live or recorded. On server-side you can use Steam.length() to see if particular stream is recorded or live - if it returns 0 then you can conclude that its live. Also you can use Admin API on application and use functions like getLiveStreams() or getRecordedStreams()

    December 2, 2010

    Steam.length()  can't be used to judge whether the stream is live or not.

    Because there may be such occations:

    the first 10 minutes of a live stream is recorded,and the next several minutes not recorded,and so on...

    Maybe getLiveStreams() will work,I'll try it out...

    Participating Frequently
    December 2, 2010

    Ok ya probably with your use case it might not work - you can also try Stream.time - see if that works