video.js - 控件在IE8中不显示 [英] video.js - controls not displaying in IE8

查看:323
本文介绍了video.js - 控件在IE8中不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实现videojs,并在所有浏览器中都能正常工作,但是这些控件不可见,IE8中的播放按钮在Flash后备中断。

挖掘,我已经确保我通过链接到CDN使用最新版本的JS和CSS。



看到boxWidth = box.offsetWidth但我相信这是从v3.2以来得到纠正。



代码如下,并通过colorbox.js中的iframe提供。

 < meta http-equiv =content-typecontent =text / html; charset = UTF-8/> 
< script src =http://code.jquery.com/jquery-1.9.1.min.js>< / script>
< link href =http://vjs.zencdn.net/4.0/video-js.css =stylesheet>
< script src =http://vjs.zencdn.net/4.0/video.js>< / script>

< / head>
< body>

<?php if(!empty($ this-> user)&& $ this-> access === true){?>
< div id =playerclass =style =>


解决方案

对于在这个线程中尝试解决方案后遇到同样问题的人,我只是经历了相同的事情,发现了一个修复程序(对于我遇到的问题,至少)。

VideoJS使用名为 VideoJS 的字体来表示控制图标。要显示图标,它使用CSS3 :在选择器之前的字体,在IE8标准模式下不起作用的IE8。即使您使用的是IE8,也可以将文档模式设置为IE7,打开开发者工具并确保您不在IE7模式下:


I'm implementing videojs and have it working in all browsers however the controls are not visible and the play button is broken in IE8 with Flash fallback.

Following some digging, I've ensured that I'm using the latest versions of js and css by linking to the cdn.

Saw a reference to "boxWidth = box.offsetWidth" but I believe this was corrected since v3.2.

The code is as follows and served up via an iframe in colorbox.js

    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
    <link href="http://vjs.zencdn.net/4.0/video-js.css" rel="stylesheet">
    <script src="http://vjs.zencdn.net/4.0/video.js"></script>

</head>
<body>

    <?php if (!empty($this->user) && $this->access === true) { ?>        
        <div id="player" class="" style="">
            <video id="video-player" class="video-js vjs-default-skin" controls autoplay width="640" height="480" datasetup="{}">
                <source src="[VIDEOURL].mp4" type="video/mp4" />
                <source src="[VIDEOURL].ogg" type="video/ogg" />    
            </video>
        </div>
    <?php } ?>

    <script>

        var player = videojs("video-player");
        _V_.options.flash.swf = "[FLASHURL].swf";

    </script>           
</body>

解决方案

For anyone having the same problem after trying the solutions in this thread, I just went through the same thing and found a fix (for the problem I was having, at least).

VideoJS uses a font called VideoJS to represent the control icons. To display the icons, it uses the font with the CSS3 :before selector, which does not work in IE8 if in IE7 Standards mode.

Even though you may be using IE8, it's possible the document mode has been set to IE7, Open up the developer tools, and make sure that you aren't on IE7 mode:

这篇关于video.js - 控件在IE8中不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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