JWPlayer(新版本)引发错误,无法在网站上播放 [英] JWPlayer (new version) throws an error and doesn't play on the site
本文介绍了JWPlayer(新版本)引发错误,无法在网站上播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是JWPlayer的最新版本,打开带有视频的页面时显示空白.奇怪的是,当我刷新两次/三次时,效果很好.
I am using latest version of JWPlayer and it shows a blank space when open the page with the video. The weird part is that when I refresh it twice/thrice, it works fine.
但是在第一次打开页面时几乎无法使用.
But it almost never works the first time the page opens.
此错误在控制台中显示:-
This the error it shows in the console :-
Error handling "jwplayerReady" event listener [0]: SyntaxError: Failed to execute
'insertRule' on 'CSSStyleSheet': Failed to parse the rule '#5831ef82aa5f92337bd88fe0c8d54bec_display_button { background-image:
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAA0CAYAAACHO2h8AAAA7ElEQ…
8thSpN0xvbts0lxeZb/ACrDeOgYYyVOWeinyp6gnWdW0Vft69cndg2ea8AAAAASUVORK5CYII=),
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAA0CAYAAACQGfi1AAAAZUlEQ…
v6Y0rIAygi5D8UjUUjA/aAyZwwOPIP2mMKRd9bdM79KAVee0AqrmZ58iQAAAAASUVORK5CYII=),
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAA0CAYAAACHO2h8AAAA8klEQ…
ZFjXwb55x8WtyKGtGRUpZCcLR7dzJ+B0iSy03DisYEQo0nc8B4p9SUlywAAAAASUVORK5CYII=);
background-position: left,center,right; background-repeat: no-repeat; padding: 0 18px 0 18px;
height: 52px; margin-top: -26px; }'. function (b){l.playerReady(b);a.css.unblock(d.id)}
知道为什么会这样吗?
谢谢.
推荐答案
在我的情况下,发生在我的容器div ID以数字字符开头的情况.
In my case, it happens when my container div ID starts with a numerical character.
jwplayer("2someID").setup({
file: fileURL,
image: imgURL
});
在此 jsFiddle 中查看示例
尝试使用非数字字符更改div容器ID.
see my example in this jsFiddle
try changing the div container id with a non-numeric character.
选中此链接以获得更多信息
这篇关于JWPlayer(新版本)引发错误,无法在网站上播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文