我有這個使用爲紐帶的工作之後打開視頻:
<a class="popup-player" href="/static/video/bunny.mp4">
video link
</a>
,然後用I幀類型,以顯示它:
$('.popup-player').magnificPopup({
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false,
iframe: {
markup: '<div class="mfp-iframe-scaler">'+
'<div class="mfp-close"></div>'+
'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
'</div>',
srcAction: 'iframe_src',
}
});
這是一個非常基本的版本,它在iframe中打開視頻,但我還沒有弄清楚如何改變諸如高度和寬度之類的東西。我仍然在學習這些東西,所以我不知道它是如何工作的,我只知道它把視頻放在屏幕上。如果你得到它的工作,並建立一個更復雜的版本,請讓我知道,所以我可以提高我的版本。
感謝幾行的鏈接,我會發布任何更新這裏如果我找到了解決方案。 – 2014-10-10 12:42:30
謝謝。運作良好。 – 2017-02-08 05:24:37