pippin wrote: 
> First: you can only have one subscription for the same player and the
> same command/status (you can have several for different players). Your
> subscription #3 overrides/unsubscribes #2.
> I believe one reason for this is that in the past cometd unsubscribes
> didn't work in Squeezebox Server so this was the only way to change a
> subscription or get rid of it.
> 
> And then: why in the world do you do the 1s subscription, that looks
> completely unnecessary to me. Why don't you just use a timer? If
> anything but the elapsed time changes while you are waiting for your 10s
> subscription you will still be notified. The only reason you need a
> certain interval is because of clock drift or in case of playback issues
> resetting the time but 10s should be more than enough for that

The 1s subscription was primarily because even though this is
JavaScript, I am running on a Pronto TSU9600 remote.  I do have the
ability to periodically schedule a function call but no guarantees that
it happens every second and is not as simple as doing in a Web Browser. 


Thinking through it a bit further, I think I can find a way to make it
work as I do have a timebase as new Date().getTime() will return a
millisecond 32 bit value.  Even if the timer does not hit every 1
second, I can use the Date().getTime() to calculate a delta value which
will allow me to add values to the floating point time retrieved from
the 10s subscription.

Sometimes the obvious reaches out and slaps you in the face when you
least expect it.. THANKS!!!!


------------------------------------------------------------------------
lynniemagoo's Profile: http://forums.slimdevices.com/member.php?userid=63334
View this thread: http://forums.slimdevices.com/showthread.php?t=106783

_______________________________________________
beta mailing list
beta@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/beta

Reply via email to