0
我目前使用jQuery.tubular(Here)在後臺顯示YT視頻,其中使用YouTube Data API提取ID。管狀負載,但不會加載我無論何種原因要求的視頻。下面是相關的JS:jQuery.tubular不接受輸入
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();});
});
控制檯讀取以下:
ID: G15btlaZR_k
Title: Ryos ft. Allisa Rose - Eclipse
Passing "{videoId: 'G15btlaZR_k'}" to jQuery.tubular.
但隨後管狀加載默認的視頻。一切看起來都應該起作用,但不是。任何線索?