Satish Krishnaraj
Posts: 0
Joined: Fri Feb 01, 2013 5:16 pm

Setting properties of audio component from rest service response (by edit mapping)

Hi,

I have a audio component in one of the pages.
The audio component has properties, of which I am interested in is the: 'src' and type.
I am getting those values from rest service and would like to set the corresponding properties in the audio component.
In tried with 'edit mapping', however, I don't see src or type attributes of the 'audio' component.

Would appreciate if you can hep me how I can achieve the mapping.
Regards,
-satish

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Setting properties of audio component from rest service response (by edit mapping)

It's a bug or not yet implemented feature. Those values should be there. But, there is a workaround. Save the data from service into local storage. Then, use in JavaScript read the values and set them on the component. Something like this:

code
var url = localStorage.getItem("url");
Tiggzi('audio_component').attr("src", url);
/code

Make sure you run this code only after the service is completed:
http://docs.tiggzi.com/documentation/...

Tiggzi JavaScript API:
http://docs.tiggzi.com/javascript-api/

Return to “Issues”