Skip to main content
October 4, 2010
Answered

How to embed timecode when publishing live video and render it when watching?

  • October 4, 2010
  • 1 reply
  • 2608 views

I've managed to publish video now:

...

ns.attachAudio (mic);
ns.attachCamera (cam);
ns.publish ("name","record");

But without time information.

Has anyone managed to do this?

    This topic has been closed for replies.
    Correct answer SE_0208

    I'm retrieving the message this way:

                       var client:Object = new Object();
                       client.somefunction = somefunction;
                       ns.client = client;

    It works in AS3,but not in AS2.

    What's the correct AS2 fashion to do the same logic?


    Directly define it on NetStream object i.e.

    ns.somefunction = function(timedata){

         //your code

    }

    1 reply

    Participating Frequently
    October 4, 2010

    Can you elaborate what do you mean by timecode here?

    October 4, 2010

    Something like this:

    2010-10-04 19:45:16

    I need to show it together with the live video.

    Participating Frequently
    October 4, 2010

    I think embedding it on continuous basis won't be great idea - you can embed it at start of publish and then have some client-side logic which increments the initial value at fixed intervals and displayed the end-result.

    You can embed at the start of publish using ns.send something like

    startCode = new Date()

    ns.send("displayTimeCode",startCode)