Skip to main content
Nov 28, 2010 8:57 AM UTC
Answered

How to record a live stream at the other side when watching?

It's natural for users to find something interesting and record it when subscribing to a live video,

but so far I can only record it when publishing,

is this possible with  FMS?

    This topic is closed to new replies. Start a new post to keep the conversation going.
    SE_0208Correct answer
    Participating Frequently
    Nov 30, 2010 9:38 AM UTC

    I got your idea,so I can nc.call server side function to check the status of the stream,and the function should be like this:

    checkstatus(stream){

      var l1 = stream.length;

      sleep(5);

      var l2 = stream.length;

      if(l1 == l2){

      //not recording

      }

    }

    But is there such a function to sleep() 5 seconds?


    You can use setInterval() for doing this logic

    14 replies

    Participating Frequently
    Nov 30, 2010 4:47 AM UTC

    If you are talking about recording at client-side i.e. on client's disk - that's not possible as of now as Flash Player does not give access to writing to disk due to security reasons

    Translate
    Nov 30, 2010 4:57 AM UTC

    Yes,I want to do recording at client-side,but not on client's disk -- record it to FMS.

    And the subscribing client can cancel/resume recording as he wishes.

    Translate
    Participating Frequently
    Nov 30, 2010 5:41 AM UTC

    Then you can build logic where in server records the whole stream and each time client wants to record live stream it just send a message to server-side function saying it wants recording to be started - the server-side would just record the time of request for that particular client and store it say some shared objects so that when that particular client requests for recorded content it serves its from that point onwards.

    Translate