Skip to main content
Known Participant
November 6, 2009
Question

Killing clients stream from server side

  • November 6, 2009
  • 1 reply
  • 650 views

Why can't (or better yet) you kill client stream from server side - I seen some code that FME may call on server side

like  s= stream.get(streamOBJ.name);

s.play(false);

delete s; application.gc(); // over kill but still did not work

I was thinking this would work by it didn't -

What am I missing?

Thanks

    This topic has been closed for replies.

    1 reply

    Asa_-_FMS
    Adobe Employee
    Adobe Employee
    November 6, 2009

    Yeah - this is a bit of a hole in the control that server side script has.  It can disconnect a client, but it can't control his playback queue.  Typically this is solved in two ways

    1.  Add RPC calls with NetConnection.call that command the client to issue a stop

    2.  Make the client play a livestream that the server controls play to and on the server stop the content.

    What you've actually done here is take a server connection to the livestream of the same name that the client is viewing - and then disconnecting that server handle from the live stream and deleting your JS reference to it.  So your actions are sandboxed away from the client actions and you'll likely want to go any of the two above paths.

    Asa

    Known Participant
    November 6, 2009

    Thanks for the feedback, So I am killimg my handle to stream etc but I am not stoping /rejeting it (sucks). Part of the reason I wanted/needed to do this is becasue I take a live c;ient stream and repub it with my  own public stream name, If a client stops or restarts their streams no big deal BUT..

    if I am using more tham one FMS (for scale) the live stream may hit other FMS and I find that depending how the client stream discounted I may still have a stream out there (orginal or even my own public stream name - I have more control over this one). So anyway I was hoping to force this other linging stream name to end/stop etc (this will show up as "badname" etc),

    Thanks again