【问题标题】:JQuery: prettyPhoto() - when used in internet explorer it tries to download the videoJQuery:prettyPhoto() - 在 Internet Explorer 中使用时,它会尝试下载视频
【发布时间】:2019-04-30 12:45:42
【问题描述】:

我已经使用 JQuery 的 prettyPhoto() 在我的页面中实现了一个弹出视频。

这适用于 Chrome、FireFox 和 Safari,但在 Internet Explorer (IE) 中使用时,它会尝试下载视频而不是在 iframe 中播放。

下载有效,然后将在媒体播放器中播放,但目标是在没有下载的情况下内联播放。

有人解释了为什么会这样吗?

<a href="<?php echo get_stylesheet_directory_uri(); ?>/assets/video/web-explainer.mp4?iframe=true" rel="prettyPhoto" class="banner-link box-link"></a>
<div class="banner-step-inner">
    <div>
        <img src="<?php echo $banner_step_image_url; ?>" alt="banner-icon" class="block mx-auto banner-icon">
    </div>
    <div>
        <h3 class="banner-text"><?php echo $banner_step_text; ?></h3>
    </div>
    <div class="banner-link-container">
        <div class="banner-link-inner">
            <img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/img/chevvy-white-right.svg">
        </div>
    </div>
</div>

<script>
    $(document).ready(function() {
        $("a[rel^='prettyPhoto']").prettyPhoto();
    });
</script>

【问题讨论】:

    标签: jquery internet-explorer prettyphoto


    【解决方案1】:

    IE 使用 Shockwave Flash 对象 在 iframe 或其他元素中显示视频。

    这个插件可能在您的 IE 中不可用,或者它没有启用

    如果它不可用,则 IE 将下载视频而不是播放它。

    将来,Flash 将从 IE 和 Edge 中删除。所以用户需要移动到 HTML5 Video 元素来显示视频。

    参考资料:

    Adobe Shockwave Player

    The End of an Era – Next Steps for Adobe Flash

    Flash & The Future of Interactive Content

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多