Skip to main content
March 29, 2011
Answered

Why server side shared object doesn't work for me ?

  • March 29, 2011
  • 1 reply
  • 1117 views

application.onPublish = function (client, p_stream)
{
     var myInfo = SharedObject.get(p_stream.name);
     myInfo.setProperty("live", true);

}

I set the sharedobject using code above,now I can publish video,but so is not set(from admin console, "shared object" tab).

What can be possible reason for this?

    This topic has been closed for replies.
    Correct answer SE_0208

    Change your code to below and see if it works (i mean i am not saying it will work - i am telling you to just try out - if it does not work - i'll look more into details)

    var myInfo;

    application.onPublish = function (client, p_stream)
    {
         myInfo = SharedObject.get(p_stream.name);
         myInfo.setProperty("live", true);

    }

    1 reply

    SE_0208Correct answer
    Participating Frequently
    April 1, 2011

    Change your code to below and see if it works (i mean i am not saying it will work - i am telling you to just try out - if it does not work - i'll look more into details)

    var myInfo;

    application.onPublish = function (client, p_stream)
    {
         myInfo = SharedObject.get(p_stream.name);
         myInfo.setProperty("live", true);

    }

    April 1, 2011

    Weird,it suddenly works today,both yours and mine ....

    Participating Frequently
    April 1, 2011

    Cool - so problem solved