Page 1 of 1

youTube video ID dynamic setting

Posted: Sat Jun 11, 2016 10:08 am
by EJLD

hello, how do you set the video ID in JS ?
I tried Appery("youTubeComponentName").videoID("07Sxxxx4R8");
but didn't work.
it's accepting Appery("...").val("xxx");
but doesn't play :(
could you help out ?
thk you
Eric


youTube video ID dynamic setting

Posted: Sun Jun 12, 2016 1:56 pm
by Illya Stepanov

Hi Eric -

You can try following code:

precode
// your video ID variable
var videoID = "p1qpT3rzpH8&quot

Apperyio('youTubeComponentName').attr("src", "https://www.youtube.com/embed/"+ videoID + "?autoplay=1&loop=1&controls=0&showinfo=0&playlist="+videoID+"&enablejsapi=1&origin=https%3A%2F%2Fappery.io");
/code/pre


youTube video ID dynamic setting

Posted: Sun Jun 12, 2016 2:07 pm
by EJLD

I'll try this one. thk you!


youTube video ID dynamic setting

Posted: Mon Jun 13, 2016 2:42 am
by EJLD

works as expected. thk you!


youTube video ID dynamic setting

Posted: Mon Jun 13, 2016 7:16 am
by EJLD

Hi There, do you agree that "onStatusChange" event doesn't fire anything ?
except "5" after page loaded.
but when start playing or pause or ... no status update.
any advice?
Eric


youTube video ID dynamic setting

Posted: Mon Jun 13, 2016 9:29 am
by Illya Stepanov

Sorry, I don't understand your question, could you please be more specific?


youTube video ID dynamic setting

Posted: Mon Jun 13, 2016 10:05 am
by EJLD

for YT component, in the event panel, there is "on status change" as follows

https://devcenter.appery.io/documenta...

the video loads, plays, pauses, ... ends
but no change in the label


youTube video ID dynamic setting

Posted: Mon Jun 13, 2016 5:42 pm
by Serhii Kulibaba

Hello,

Please check if there are any errors in the browser console. You can learn here: https://devcenter.appery.io/documenta... how to open the console.