Skip to main content
Known Participant
April 18, 2011
Question

Scheduled recording server-side

  • April 18, 2011
  • 1 reply
  • 1051 views

Hi all,

any code examples on server-side scheduled recording on FMIS?

Need to record live stream i'm getting from FMLE but from scheduled start to end time.

Can i add more scheduled recordings while live streaming is working?

Please help.

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    April 19, 2011

    I would give you rough code - i mean like psudo code

    var startInterval = null;

    var stopInterval = null;

    var startTime;   //initialize it as per your startTime

    var stopTime;   //nitialize it as per your stopTime

    application.onPublish = function(c,s){

         application.s = s;

         startInterval = setInterval(startRecord, 100);

    }

    function startRecord(){

    var currentDate = new Date();

    if(currentDate >= startDate){

       application.s.record();

         clearInterval(startInterval);

         stopInterval = setInterval(stopRecord, 100)

         }

    }

    // same as above write stopRecord function

    Can i add more scheduled recordings while live streaming is working?

         Can you elaborate what is your use case?

    nnmkAuthor
    Known Participant
    April 19, 2011

    I want to write an application that would be able to add scheduled recordings at any time during the live streaming so thats the use case.

    (Imagine continous neverending live stream and someone that adds scheduled recordings from time to time)

    Lets say that app would be able to generate the appropriate server side code - what then?

    Do i restart the recording app, or the whole server?

    Thank you for your answer.

    Participating Frequently
    April 20, 2011

    You will have to reload only the application for any code change. But then it wont be good idea to do that. I would instead suggest you to write code - may be some client code which would send command to server-side code to start and stop the recording. This way you wont have to change the server-side code.