How to use a PreviewWidget of type audio?
I'm trying to use a PreviewWidget of type audio but have had no success so far.
The C++ API docs say that the 'tracks' attribute expects a composite attribute containing an array of tuples and that it can be created by using a VariantBuilder. However, for javascript, the VariantBuilder class does not seem to be present.
I have tried to use an array of objects, like this:
var audio = new scopes.
audio.add_
"tracks",
[
{
}
]
);
This fails with the following error:
file://
The PreviewWidget does get added and it includes a single track. The track does not show the title, and then when I try to click on the widget in order to hear the sound, I get this error:
file://
I've tried searching online for examples of this type, but came up short. Thanks for your help.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Marcus Tomlinson
- Solved:
- Last query:
- Last reply: