Page 1 of 2

Youtube ID from localstorage item

Posted: Wed Feb 12, 2014 6:46 pm
by Rafael Martínez

We asign the Youtube ID from an item in the onload event but it gives error. We tried with OnLoad and also with Before OnLoad event, and we got error on Youtube component in both cases.

Is it possible assign the ID to the Youtube component dinamically?


Youtube ID from localstorage item

Posted: Wed Feb 12, 2014 7:01 pm
by Kateryna Grynko

Hi Rafael,

What is Youtube ID? Where do you add it?


Youtube ID from localstorage item

Posted: Wed Feb 12, 2014 7:08 pm
by Rafael Martínez

Sorry, I wanted to refer to the Video ID of Youtube component.


Youtube ID from localstorage item

Posted: Wed Feb 12, 2014 8:05 pm
by Kateryna Grynko

Rafael,

We have a Video component, do you mean it? What do you want to do? http://docs.appery.io/documentation/u...


Youtube ID from localstorage item

Posted: Wed Feb 12, 2014 8:26 pm
by Rafael Martínez

No, I'm not referring to the video component, I'm referring to the Youtube component.

We want to assign dynamically the ID property of this component, and we got errors when we do it. (We are trying to set the ID property from a local storage variable.)

. Image Image Image


Youtube ID from localstorage item

Posted: Wed Feb 12, 2014 10:25 pm
by Kateryna Grynko

Rafael,

We've tested. This is a bug, will be fixed.

Here is a workaround:preAppery("youtubeName").attr("src", "http://www.youtube.com/embed/"+ yotubeID);/preWhere 'youtubeName' is a component name,
'yotubeID' is a video id.


Youtube ID from localstorage item

Posted: Wed Feb 12, 2014 10:28 pm
by Rafael Martínez

Ok Katya, thank you so much.


Youtube ID from localstorage item

Posted: Wed Feb 12, 2014 10:41 pm
by Rafael Martínez

Katya, this solution:

Appery("youtubeName").attr("src", "https://www.youtube.com/embed/"+ yotubeID);

doesn't work for me.


Youtube ID from localstorage item

Posted: Wed Feb 12, 2014 10:49 pm
by Kateryna Grynko

Rafael,

We'll search for another one. Sorry for the inconvenience.


Youtube ID from localstorage item

Posted: Wed Feb 12, 2014 11:32 pm
by Igor

Did you replace "youtubeName" with your component name? Please tell us, what yotubeID did you use for testing?