Jump to content

[fixed with timer callback] DisplayMessage interesting behaviour


Recommended Posts

Posted (edited)

Heys guys :)

 

This is interesting.

 

If I attach a display message general command to an event, for instance sessionStarted, you would think that when a user starts a session that that particular client (which allows messages to e displayed) would show the message.

 

When infact it will not.

 

If I keep the sessionStarted event general enough to broadcast a message to any client able to see it, then all those clients will receive a message but not the one which just started the session, triggering the event.

 

Wierd right? Or not?

 

Ben

Edited by chef
Posted

In order to fix this problem, I create a threading timer with a delegate which waits 1 second before send a message. Then the client seems to Recieve it without an issue :)

 

Unfortunately the threading timer wants a static callback delegate which causes some extra code and classes to be written into the my plugin.

 

Oh well it is working now :)

Posted (edited)

One other thought, 1 second might not be enough time to allow for the client to fully load if the client is out side the local network.

 

5 seconds might be better. Luckily the plugin has an option to pause playback if it has started.

Edited by chef
Posted

Great info, thanks !

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...