if (player != null) {
pendingplayer = Red5.getConnectionLocal();
pendingplayerisnull = false;
if (pendingplayer instanceof IServiceCapableConnection) {
IServiceCapableConnection sc = (IServiceCapableConnection) pendingplayer;
String str = "connection PENDING user " + state.get(State.values.pendinguserconnected);
if (authtoken != null) {
// System.out.println("sending store cookie");
str += " storecookie " + authtoken;
authtoken = null;
}
str += " someonealreadydriving " + state.get(State.values.driver.name());
// this has to be last to above variables are already set in java script
sc.invoke("message", new Object[] { null, "green", "multiple", str });
str = state.get(State.values.pendinguserconnected) + " pending connection from: "
+ pendingplayer.getRemoteAddress();
Util.log("playersignin(): " + str);
messageGrabber(str, null);
sc.invoke("videoSoundMode", new Object[] { videosoundmode });
}
} else {
player = Red5.getConnectionLocal();
state.set(State.values.driver.name(), state.get(State.values.pendinguserconnected));
state.delete(State.values.pendinguserconnected);
String str = "connection connected user " + state.get(State.values.driver.name());
if (authtoken != null) {
str += " storecookie " + authtoken;
authtoken = null;
}
str += " streamsettings " + streamSettings();
messageplayer(state.get(State.values.driver.name()) + " connected to OCULUS", "multiple", str);
initialstatuscalled = false;
str = state.get(State.values.driver.name()) + " connected from: " + player.getRemoteAddress();
messageGrabber(str, "connection " + state.get(State.values.driver.name()) + " connected");
Util.log("playersignin(), " + str, this);
loginRecords.beDriver();
if (settings.getBoolean(GUISettings.loginnotify)) {
saySpeech("lawg inn " + state.get(State.values.driver));
}
IServiceCapableConnection sc = (IServiceCapableConnection) player;
sc.invoke("videoSoundMode", new Object[] { videosoundmode });
Util.log("player video sound mode = "+videosoundmode, this);
}
}