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

JWPlayer 6.8 doesn't reliably go to audio mode


We are trying to use the player for audio files, displaying just the controlbar (with horizontal volume control).
This works fine on simple cases, however on our pages frequently the player displays in video mode instead of audio mode, in spite of the setting height:30.

The problem seems related to the fact that our pages have parts initially not shown, made visibile later on, via javascript and css.

Here is a very simplified example showing the problem:

1) http://www-acc.esa.int/temp/audio_embed_0.html
This is a few line page working as expected, with two players for two audio files.

2) http://www-acc.esa.int/temp/audio_embed_1.html
This is like the previous case, but the "div" containing the players is not initially displayed,
it becomes visible only after clicking on the html button labelled "show".
Here we have the problem. The players work, but they show the "video" interface, not the "audio" one:
the volume control is vertical, the control bar has a default margin, etc. etc.

Notes:

1. The problem shows up independently on the used skin, and independently on using free or premium jwplayer edition.

2. There seem to be workarounds, like issuing jwplayer().setup() only after the player has become visible on the page, but this is not easily applicable to our full pages (built via a cms) since we may have several html containers that may be hidden or shown, and it's not clear where to move jwplayer().setup() in order to always avoid the problem.


So, is there a way (in addition to what we already have: the height setting to 30) to ensure that
the embedded player switches to audio mode?

6 Community Answers

jherrieven

Best Answer 

Try:

#players {
position: absolute;
left:-99999px;
background-color: #9f9;
padding: 1px 0;
}

and

function show() {
document.getElementById('players').style.position = 'static';
}

...
James Herrieven

View in conversation

jherrieven

Best Answer  User  
0 rated :

Try:

#players {
position: absolute;
left:-99999px;
background-color: #9f9;
padding: 1px 0;
}

and

function show() {
document.getElementById('players').style.position = 'static';
}

...
James Herrieven

fassino

User  
0 rated :

Thanks James, that works, see
http://www-acc.esa.int/temp/audio_embed_4.html

Now to check if it works also on our full pages we need to change the way used there to hide/display parts which involves some jquery functions. If it works, it's surely a better workaround than having to move/delay the jwplayer().setup()

Ethan Feldman

JW Player Support Agent  
0 rated :

Another way to try to do this instead of using display none would be visibility hidden possibly?

fassino

User  
0 rated :

Hi Ethan,
Yes using visibility:hidden/visible is another way to avoid the problem, see http://www-acc.esa.int/temp/audio_embed_5.html

Of course visibility:hidden still takes room on the page, so depending on the desired effect it may or may not be a usable workaround.

And of course we had preferred to be able to continue to use display:none/block, to avoid having to restructure our pages :)


Ethan Feldman

JW Player Support Agent  
0 rated :

Hm, or make it hidden and 1×1 px?

fassino

User  
0 rated :

Hi Ethan,

Sure visibility:hidden and small dimensions can emulate display:none, like using an off-screen absolute position as suggested initially by James.

One of the reasons why I still see a limitation here, is that you cannot use for example the jquery functions hide and fadeIn to hide/show the part, since these are based on display:none.

This question has received the maximum number of answers.