Skip to main content
June 17, 2009
Question

How to replace a ClientID in username

  • June 17, 2009
  • 3 replies
  • 1285 views

Hello,

I wonder whether it is possible to replace FMS ClientID generated by a user name ?

If so how ?

Thanks you for your reply
    This topic has been closed for replies.

    3 replies

    June 17, 2009

    ok,

    the code you give me should be added to a particular file, if so which ?

    I am sorry for all this question but I am still a beginner with FMS
    Participating Frequently
    June 22, 2009

    Add that code to main.asc of you application. Say if your player/client is connecting to "myApp", you can put that code in application.onConnect handler of the main.asc

    like

    application.onConnect = function(client){

    this.clientObj = new Object;

    this.clientObj = client;

    this.clientObj.uName = username;

    }

    June 17, 2009

    Thank you for your reply

    this.clientObj = new Object;

    this.clientObj = client;

    this.clientObj.uName = username;

    I do not know at all or place the code in FMS or JW Player ?

    calmchessplayer
    Inspiring
    June 17, 2009

    Thats server side FMS code.

    calmchessplayer
    Inspiring
    June 17, 2009

    you can say this.clientID = this.client; and add clientID to the client object....generally though you add the user name to a user object something like ..

    this.clientObj = new Object;

    this.clientObj = client;

    this.clientObj.uName = username;

    you might have to tweak the above to make it work i'm writing it from memory instead of looking at my notes.

    June 17, 2009

    If you mean to change what's displayed in the admin console, I'm fairly certain you can't. That ID is generated by the server when the client object is created, and I recall reading that the id property is read only.