Skip to content

Getting WCS version at client side

Since Web SDK build 2.0.281 the current server version is available after successful connection.

Use the method Session.getServerVersion() when SERVER_INFO.SERVER_VERSION message is received

code

const SERVER_INFO = Flashphoner.constants.SERVER_INFO;
...
function connect() {
    ...
    console.log("Create new session with url " + url);
    Flashphoner.createSession({urlServer: url, timeout: tm}).on(SESSION_STATUS.ESTABLISHED, function (session) {
        ...
    }).on(SERVER_INFO.SERVER_VERSION, function(session) {
        updateServerVersion(session.getServerVersion());
    }).on(SESSION_STATUS.DISCONNECTED, function () {
        ...
    }).on(SESSION_STATUS.FAILED, function () {
        ...
    });
}