Skip to main content
Participating Frequently
November 12, 2010
Question

Is it possible to receive stream.send commands on server-side?

  • November 12, 2010
  • 1 reply
  • 437 views

Hey guys,

I am recording a video and while recording I issue some NetStream.send("doSomething", params) commands from client side. When I am playing back this video I receive the doSomething events on client side. No problems so far.

Question is:  Can I receive those events on server side? I want to handle those events on server side. Not client side.

Any ideas?

    This topic has been closed for replies.

    1 reply

    November 12, 2010

    you can handle the events on the server side by creating a stream, and playing the source stream over that stream

    var s = Stream.get("serverstream");

    s.doSomething = function(vars){

    // handle your processing here

    }

    s.play("thepublishedstream", -1, -1);

    That said, you can't prevent the doSomething call from going through to the subscribing client. So, you'll want to have an event handler in your player anyway (even if the handler doesn't actually do anything) to prevent runtime errors.

    cashuaAuthor
    Participating Frequently
    November 12, 2010

    Oh god, How didn't I think of that

    Thanks.