在没有Flash的情况下嵌入Vimeo专辑

时间:2017-05-15 23:51:05

标签: jquery html flash vimeo vimeo-api

我试图使用他们的Hubnut小部件快速嵌入Vimeo专辑,但如果没有Flash,它就无法运行。我想将iFrame与专辑的直接链接作为替代,但它不是bueno。当我检查控制台时,它说," X-Frame-Options拒绝加载:https://vimeo.com/album/xxxxxx不允许跨源框架。"有没有办法解决这个问题?

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
    var flash = swfobject.hasFlashPlayerVersion('1') ? true : false;
    if (flash) {
        $('#embed').html('<iframe src="//player.vimeo.com/hubnut/album/xxxxxx?color=a13647&amp;background=0f0f0f&amp;slideshow=0&amp;video_title=1&amp;video_byline=0" style="display: block;" width="758" height="426" border="0" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen seamless></iframe>');
    } else {
        $('#embed').html('<iframe src="https://vimeo.com/album/xxxxxx" style="display: block;" width="758" height="426" border="0" frameborder="0" seamless></iframe>');
    }
});
</script>
<div id="embed">
    <p><a href="https://vimeo.com/album/xxxxxx" target="_blank">View Virtual Tours</a></p>
</div>

0 个答案:

没有答案