IE8中未显示视频元素? [英] Video element is not displaying in IE8?

查看:91
本文介绍了IE8中未显示视频元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在所有浏览器中嵌入视频元素,但是它在除IE8之外的所有浏览器中都能正常工作.在这里,我正在使用mediaelement.js库来实现.

I want to embed video element in all browsers,but its working fine in all browsers except IE8.Here, i am using mediaelement.js library to implement.

推荐答案

首先要尝试的几件事:

  • 确保在IE8上安装了Flash.这是旧版浏览器中Mediaelement.js的后备.
  • 确保将所有脚本和CSS放入<head>标记内.从IE6-8中的<body>起将无法使用.
  • 尝试访问Mediaelement的网站或下面的链接.在安装了Flash的IE8中,它们应该可以正常工作,否则,可能是浏览器的本地问题.
  • Make sure Flash is installed on IE8. It's the fallback for Mediaelement.js in older browsers.
  • Make sure you place all scripts and css inside the <head> tag. It will not work from <body> in IE6-8.
  • Try going to Mediaelement's website or the link below. They should work fine in IE8 with flash installed, and if they're not, then it's probably a local problem with your browser.

我在下面的IE8中整理了一个工作示例.

I put together a working example in IE8 below.

JSBin 上的示例.

Example on JSBin.

  • IE版本8.0.6001.18702
  • jQuery版本1.10.2
  • Mediaelement.js版本2.13.2

相关代码

<head>
    <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <meta charset="utf-8">
    <title>JS Bin</title>
    <script type="text/javascript" src="http://mediaelementjs.com/js/mejs-2.13.2/mediaelement-and-player.min.js"></script>
    <script>
        jQuery(document).ready(function($) {
            var player = new MediaElementPlayer('#player1');
        });
    </script>
</head>
<body>
    <video id="player1" src="http://techslides.com/demos/sample-videos/small.mp4" width="320" height="240"></video>
</body>

在IE8中工作

这篇关于IE8中未显示视频元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆