JWPlayer不为Internet Explorer 8工作

时间:2022-03-20 17:25:42

For some reason Internet Explorer 8 and below does not run JWPlayer and I have referenced everything correctly. Why won't video work on jwplayer?

由于某些原因,Internet Explorer 8和以下没有运行JWPlayer,我已经正确地引用了所有内容。为什么视频不能在jwplayer上运行?

It seems as if jwplayer isn't even loading in IE8 or below.

看起来jwplayer甚至没有加载到IE8或以下。

Can you somebody help me?

你能帮我个忙吗?

1 个解决方案

#1


0  

window.outerWidth is undefined in IE8, therefor your conditional evaluates to false and the JWPlayer code never runs.

窗口。在IE8中,outerWidth是未定义的,因此条件求值为false, JWPlayer代码永远不会运行。

Really not that hard to have debugged yourself. A simple alert or console.log in the conditional shows it isn't running, then you deduce it might be because the conditional itself is evaluating wrong, then a simple alert or console.log of window.outerWidth shows it is undefined.

真的没有那么难调试自己。一个简单的警报或控制台。在有条件的显示中,它没有运行,然后你推断它可能是因为条件本身正在评估错误,然后是一个简单的警告或控制台。日志窗口。外宽表示未定义。

Same problem with a potential solution: https://*.com/a/5954761/1217408

潜在解决方案也存在同样的问题:https://*.com/a/5954761/1217408

Using document.body.clientWidth as pointed out there, something like this should work:

使用document.body。如前面所指出的,客户宽度应该是这样的:

if((window.outerWidth && window.outerWidth > 640) || (document.body.clientWidth && document.body.clientWidth > 640)){

You should keep in mind that in IE this might include the scrollbar when calculating the available width. They are not exactly equivalent but if you're careful or mindful of it then you shouldn't have any problem.

您应该记住,在IE中,当计算可用宽度时,可能包括滚动条。它们并不是完全相等的,但如果你仔细或注意到它,你就不会有任何问题。

#1


0  

window.outerWidth is undefined in IE8, therefor your conditional evaluates to false and the JWPlayer code never runs.

窗口。在IE8中,outerWidth是未定义的,因此条件求值为false, JWPlayer代码永远不会运行。

Really not that hard to have debugged yourself. A simple alert or console.log in the conditional shows it isn't running, then you deduce it might be because the conditional itself is evaluating wrong, then a simple alert or console.log of window.outerWidth shows it is undefined.

真的没有那么难调试自己。一个简单的警报或控制台。在有条件的显示中,它没有运行,然后你推断它可能是因为条件本身正在评估错误,然后是一个简单的警告或控制台。日志窗口。外宽表示未定义。

Same problem with a potential solution: https://*.com/a/5954761/1217408

潜在解决方案也存在同样的问题:https://*.com/a/5954761/1217408

Using document.body.clientWidth as pointed out there, something like this should work:

使用document.body。如前面所指出的,客户宽度应该是这样的:

if((window.outerWidth && window.outerWidth > 640) || (document.body.clientWidth && document.body.clientWidth > 640)){

You should keep in mind that in IE this might include the scrollbar when calculating the available width. They are not exactly equivalent but if you're careful or mindful of it then you shouldn't have any problem.

您应该记住,在IE中,当计算可用宽度时,可能包括滚动条。它们并不是完全相等的,但如果你仔细或注意到它,你就不会有任何问题。