Currently pushes hard coded '/video/vid1.MP4' into the list and this URL is diplayed for all items. I want to display the variable I have defined in my Javascript2 under 'content'.
HTML:
<video id=vid src='#' data-win-bind="src: videoUrl" />
JavaScript1:
for (var i = 0; i <= this._items.length; i++) {
list.push({ videoUrl: '/video/vid1.MP4' });
}
This is used to generate data in different views! I want to call the variable stored in content into the javascript below under videoUrl.
JavaScript2:
var video = "/video/vid.mp4";
var sampleItems = [
{ group: sampleGroups[0], content: video},
{ group: sampleGroups[0],content: video},
{ group: sampleGroups[0], content: video}
];
Essentially I want to use'content' rather then a hard coded url. I want to carry information from one JavaScript file to a different one.
eg. list.push({ videoUrl: content });