Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Problems setting background colour to white


My videos are white background and I would like the player to show a white background. I have 2 questions around this I'm hoping I can get help with:

Question 1:
When I use swfobject.embedSWF with "'bgcolor' : '#ffffff'" it works but when I use:
jwplayer('videoDiv').setup({id : 'player1'
,flashplayer : '/swf/player.swf',
,file : '/mov/letsGo.mp4'
,backcolor : 'FFFFFF'
,screencolor : 'FFFFFF'
}
)
it first displays a black background and only then goes white which creates an annoying flickering effect. How can I get it to display white immediately?

Question 2:
In the documentation I see on the site it seems to say that backcolor is only applicable to flash and indeed I only see white in flash - if html5 then it shows as a black background. How does one achieve white background for html5?

8 Community Answers

JW Player

User  
0 rated :

There are two possible and needed things to do to accomplish this.
If you use a skin then you need to do both IF only the JWPlayer then the 2nd part.

<ol>
<li>use a skin and change its background to #FFFFFF</li>
<li>make an edit in the jwplayer.js to reflect #FFFFFF</li>
</ol>

The 2nd part require a bit of JavaScript knowledge to accomplish this as you would have to make an edit in the jwplayer.js

On my own web site, I made it a transparent background for both the JWPlayer and for the skin that I am using.

If you want to see this in action then visit my web site, www.mirana.net



JW Player

User  
0 rated :

thanks again Willie,

i'm not using a skin so don't have to worry about item 1 however I have gone through the jwplayer.js file replacing the following locations value 00000 with value FFFFFF (ie. white)

-- parseInt(f,16)}return parseInt("FFFFFF",16)}})(jwplayer);
-- var z="#000000";var u;if(a.utils.isIE())
-- var b={backgroundcolor:"",margin:10
-- t.setAttribute("bgcolor","#000000");
-- var j=a.utils.extend({screencolor:"0x000000"},b);
-- return k.skin.getComponentSettings("display").backgroundcolor}return parseInt("000000",16)}
-- zIndex:100,background:"000000"
-- backgroundColor:parseInt("000000",16)

This seems to work ok (with the exception that it still displays black when using IE developer tools to test IE versions) however I I HATE having to take this approach for 2 reasons:
1. I am winging it and have no idea whether there will be unknown consequences
2. It has to be repeated for every new version of jwplayer.js deployed in future

I thus have a question for LongTail team which is: Is there no way to set the background colour effectively via standard Longtail configuration parameters?

JW Player

User  
0 rated :

replying to your points

<ol>
<li>you do have to know what you are doing</li>
<li>unfortunately true BUT then once you know how then it is a snap to repeat it</li>
</ol>

By virtue that I use CSS 3d animations on my web site I exclude <IE9 from my web site so that isn't a concern. IE9 will simply ignore the animation and I haven't given support for IE10 yet.

To answer your query, there is no other way that I am aware of other than what I had posted above.
LTV should offer this as an option.

Ethan Feldman

JW Player Support Agent  
0 rated :

@Ricky – If you want to remove this black flash at the beginning, you need to change the color in jwplayer.js itself. just change all references of 000000 to ffffff. A simple find/replace.

JW Player

User  
0 rated :

thanks Ethan - won't this mess with the foreground colour also? (as I think I saw some foreground references to 000000 when going through jwplayer.js - also I think a specific mapping of the description "black" to 000000, and i imagine changing this may cause problems?)

As a general question: is it possible that "background colour" could be made a jwplayer configuration setting?



Ethan Feldman

JW Player Support Agent  
0 rated :

Np. You could take the time to specifically change bgcolor in jwplayer.js, that will also work. I can request it be added to the embedder though.

JW Player

User  
0 rated :

Hi there - the player.swf has a black background

I have made all changes as suggested above but still get the initial black frame. -

Is there a way to edit the player.swf?

Ethan Feldman

JW Player Support Agent  
0 rated :

@Toh H – Link please? You should just have to set the screencolor flashvar to FFFFFF.

This question has received the maximum number of answers.