Quote from
emo on March 24, 2020, 7:41 pm
//this works
var videoSources = [//array of sources to use in the loop
["http://www.w3schools.com/html/mov_bbb.mp4"],
["http://www.w3schools.com/html/movie.mp4"]
];
//but this don't work
var videoSources=$App.files;
console.log(videoSources);
// gives this errors:
//jQuery.Deferred exception: Operando no válido para 'in': se esperaba un objeto
//Operando no válido para 'in': se esperaba un objeto (jquery.min.js, 2)
I also try:
var videoSources=[$App.files];
// no error, but don't show the videos
//the console log with videoSorces show:
//["http://www.w3schools.com/html/mov_bbb.mp4"],["http://www.w3schools.com/html/movie.mp4"]
//[files] is declared with CreateEmptyArray [files]
// and filled as:
// $App.files[0]="[\"http://www.w3schools.com/html/mov_bbb.mp4+"\"]";
// $App.files[1]="[\"http://www.w3schools.com/html/movie.mp4+"\"]";
Ok, finally works with:
str="http://www.w3schools.com/html/mov_bbb.mp4";
$App.files[i]=[str];
//this works
var videoSources = [//array of sources to use in the loop
["http://www.w3schools.com/html/mov_bbb.mp4"],
["http://www.w3schools.com/html/movie.mp4"]
];
//but this don't work
var videoSources=$App.files;
console.log(videoSources);
// gives this errors:
//jQuery.Deferred exception: Operando no válido para 'in': se esperaba un objeto
//Operando no válido para 'in': se esperaba un objeto (jquery.min.js, 2)
I also try:
var videoSources=[$App.files];
// no error, but don't show the videos
//the console log with videoSorces show:
//["http://www.w3schools.com/html/mov_bbb.mp4"],["http://www.w3schools.com/html/movie.mp4"]
//[files] is declared with CreateEmptyArray [files]
// and filled as:
// $App.files[0]="[\"http://www.w3schools.com/html/mov_bbb.mp4+"\"]";
// $App.files[1]="[\"http://www.w3schools.com/html/movie.mp4+"\"]";
Ok, finally works with:
str="http://www.w3schools.com/html/mov_bbb.mp4";
$App.files[i]=[str];