I have links with vimeo urls in them:
<a class="video" href="http://vimeo.com/9532951">link 1</a>
<a class="video" href="http://vimeo.com/8228482">link 2</a>
Then I have manual fancybox call that loads the video into a fancybox:
<script>
$("a.video").click(function() {
$.fancybox({
'padding' : 0,
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'title' : this.title,
'width' : 400,
'height' : 265,
'href' : this.href.replace(new RegExp("([0-9])","i"),'moogaloop.swf?clip_id=$1'),
'type' : 'swf'
});
return false;
});
</script>
我不能爲我的生活弄清楚如何將參數傳遞給視頻播放器...... autoplay = 1或fullscreen = 1等等等等等等等等。我嘗試了幾件事情,但都沒有奏效。正在考慮這是像添加'swf' : 'autoplay=1'
,但沒有奏效。無論如何,任何幫助將不勝感激是否有可能通過帶有動態hrefs的jQuery函數傳遞Vimeo播放器變量?
謝謝。
試過這個,但它不工作。還嘗試追加href調用 'href':this.href.replace(new RegExp(「([0-9])」,「i」),'moogaloop.swf?clip_id = $ 1'+'&autoplay = 1 '), 我認爲fancybox只是解析帶有附加自動播放功能的網址時遇到問題。 – Reece 2010-12-10 15:42:37