Getting playhead position in extension

Hi,

I’m trying to write an extension using C++ SDK, which would automatically display some information based on playhead position. But I can’t find any API which would return current playhead position.

Here is what I tried instead, but this doesn’t work either:

  1. I have SAFP in Global Rackspace.
  2. I create a Label widget called playerTime in Global Rackspace and mapped in to SAFP’s Position.
  3. When song is playing I see time updated in the Label.
  4. In my extension I have:
    listenForWidget("playerTime", true);
    and registerCallback(“OnWidgetCaptionChanged”);
  5. But callback is never called for this widget.

I have other widgets, located in non-global rackspace which I can observe in my extension without issues (however their captions are modified via song part actions).

Is such scenario supported? Maybe there is a better way to access playback position inside extension?

Answering my own question: looks like I should have used OnWidgetValueChanged.