I am currently using jQuery.tubular (Here) to display a YT video in the background, where the ID is fetched using the YouTube Data API. Tubular loads, but is not loading the video I ask it to for whatever reason. Here is the related JS:
var output;
$(document).ready(function() {
getURLPs(); //parses url params into an array, this works
$('#content').hide().delay(7000).fadeIn('slow');
console.log('ID: '+urlParams["id"]);
console.log('Title: '+urlParams["title"]);
tubularoptions = '{videoId: \''+urlParams["id"]+'\'}';
console.log('Passing \"'+tubularoptions+'\" to jQuery.tubular.');
$('#wrapper').tubular(tubularoptions);
output = '<span class=\"animlink\"><a href=\"http://www.youtube.com/watch?v='+urlParams["id"]+'\">'+urlParams["title"]+'</a></span>';
$('#nowplaying-text').append(output);
$('#preloader').delay(1000).fadeOut('slow',function(){$(this).remove();});
});
The console reads the following:
ID: G15btlaZR_k
Title: Ryos ft. Allisa Rose - Eclipse
Passing "{videoId: 'G15btlaZR_k'}" to jQuery.tubular.
But then tubular loads the default video. Everything looks like it should work, but isn't. Any clues?