Web UI JavaScript API not working as expected

I have started developing my own Web UI, based on the Cantabile JavaScript API provided by @brad.
For some features I need to ‘invoke’ target binding points like ‘global.indexedMediaPlayer.play’ that
require the indicies for Song (=0) and the first media player (=0). But I can’t get them to work.

Most of the target bindings points that do not require indicies work properly.

I also tried the Cantabile Network API documentation site. That site allows to POST the requests
manually. But it shows the same behaviour. All invoked target bindings points that do require
the indicies do not have any effect on Cantabile (license is ‘Performer’).

The same issue occures when I query a source binding point that requires the indicies.

I am stuck…

Anybody familiar with that API?

What build are you running. There were some fixes for this in build 3638.

Also, the current build has an issue with parsing some binding indicies. This issue has already been fixed for the next build but in the meantime, try passing the indicies as a quoted string rather than directly. eg: "[0,1]" instead of [0,1].

Brad

I was running the stable build (3636). Now updated to 3640 and it’s working now as expected. Should have checked the release notes first…

Thank you for the fast repsone. Awesome!

Paul

1 Like

I made good progress on my new Web UI. But there is one more point regarding the binding ‘global.transport.timeSignatureDenominator2Power’.

When querying (or watching) the binding, it returns a value (integer) that is too high (+1).

Example: for denominator 8 it returns the value: 4 instead of 3 (8 = 2^3).

I had to apply some code (value - 1) to achieve correct behaviour.

Will there be a fix?

Hi Paul,

Thanks for reporting… fixed for the next build (3641) coming soon (hopefully).

Brad

Hi Brad,

Build 3641 installed. Problem solved. Thank you.

I observed that when play ranges are defined on a media player file, and a range is selected, the media file name (which contains the range name), does not reflect the change. The range name remains at the value set at startup or set when changing files.

This is observable also when querying or watching the binding ‘global.indexedMediaPlayer.selectedFileName’.

That’d be a bug - I’ll look into it.