It looks like my English is quite far from ideal =)
I need to call function on client side!
The full procedure is as follows:
1) Clients connect to the server and begin to watch stream
2) The streamer clicks the "show advertising." Called netConnection.call("showAd", null, "myStreamName");
3) The server runs the function:
As a result, each client who is currently looking stream should call showAds.
public void showAd(IClient client, RequestFunction function, AMFDataList params)
String streamName = params.getString(PARAM1);
IMediaStream stream = client.getAppInstance().getStreams().getStream(streamName);
//Here i should call "showAds" for all clients who watch the stream myStreamName.