I have a fiew movie in my website and I cant play movie.
This is code in java. I send name of video id to javascript:
for(int i=1; i<=Integer.parseInt(film[0][0]); i++)
{
nr="id"+Integer.toString(i);
printWriter.print("<input type='hidden' id=\""+nr+"\" name='numerId' value='"+film[i][0]+"' />");
}
This is code in javascript:
var test2=[];
var test3=[];
var myVideoTab= new Array();
for(i = 1; i < size; i++){
test2[i]='id'+i;
test3[i]=document.getElementById(test2[i]).value;
myVideoTab[i]= document.getElementById(test3[i]);
setTimeout(function () {myVideoTab[i].Play();}, 1000); //in this line is error
This is the error: Uncaught TypeError: Cannot read property 'Play' of undefined. If i set
myVideoTab1= document.getElementById(test3[i]);
setTimeout(function () {myVideoTab1.Play();}, 1000);
it work but only one video play