问题描述
videojs(v3.2.0)始终显示黑色背景。
有人知道如何改变吗?
videojs (v3.2.0) always shows a black background, when loading the video in swf mode.Does someone know how to change that?
你可以向玩家添加这样的swf参数:
You can add swf params like that to the player:
var params = {};
params.bgcolor = "#ffffff";
params.wmode = "transparent";
V .options.flash.params = params;
V.options.flash.params = params;
使用wmode =transparent,您可以在左上角看到一个黑框。
在IE7 / 8上,播放视频时该框不会消失,并在视频周围显示为黑线(如黑色边框顶部)。
With wmode = "transparent" you can see a black box in the top left corner.On IE7/8 the box does not disappear when playing the video and shows up as a black line around the video (like a black border-top).
非常感谢,
Florian
Many thanks,Florian
推荐答案
啊我刚发现这个:
建议使用flash builder自行编译swf。你可以在这里下载项目:
there it is recommended to compile the swf yourself with flash builder. you can download the project here: https://github.com/zencoder/video-js-swf
然后你可以用自定义背景颜色设置你自己的swf:
Then you can set your own swf with custom background color like that:
var params = {};
params.bgcolor = "#ffffff";
_V_.options.flash.swf = "videojs/VideoJS.swf";
_V_.options.flash.params = params;
希望videojs很快会更新他们的自我下载和包含正确swf的CDN。
欢呼,
Florian
hope videojs will soon update their selfhost-download and the CDN with a proper swf included.cheers,Florian
这篇关于videojs禁用黑色背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!