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

setup timeout problem probably related to volume

My web-app, which was properly playing songs, is not setting-up properly, when I run the jwplayer setup function, there is a long pause, 30 seconds(?), after which the following message is displayed;

Setup Timeout Error: Setup took longer than 30 seconds to complete.

When I look at the console window, I see the following:

Uncaught TypeError: Failed to set the 'volume' property on 'HTMLMediaElement': The provided double value is non-finite.
at l.T.volume (provider.html5.js:1)
at l.changeVideoProvider (jFpbAbho.js:3)
at l.setProvider (jFpbAbho.js:3)
at l.setActiveItem (jFpbAbho.js:3)
at l.setItemIndex (jFpbAbho.js:3)
at Object.P [as method] (jFpbAbho.js:5)
at u (jFpbAbho.js:4)
at l (jFpbAbho.js:4)
at d (jFpbAbho.js:4)
at n (jFpbAbho.js:4)

Here is the segment of JavaScript code that is being used in the setup function call:

function show_player( element, trackpath, title='' ) {
var parameters = { file: '/Resources/public/songs/' + trackpath,
title: title,
displaytitle: false,
description: '30 Second Sample',
height: 26,
width: 480,
timeSliderAbove: false,
controls: true,
controlbar: 'bottom',
autostart: true
}; = 'song';

show_player.player = jwplayer( element );

show_player.player.setup( parameters );

After successfully getting JWPlayer to play songs I tried to implement a volume fade-out near the end of a song's play using several JWPlayer event handlers: Time, Seek, Volume, and Completed. After coding the fade-out, the volume did incrementally reduce over sever calls to Time, but after the song's volume dropped towards zero, I notice several clicks. When the volume reaches zero then the Seek function is used to jump to the end of the song. The Seek event handler used to prevent the user from seeking past the first 30 seconds of the playing song The Volume event handler is used to prevent the user from changing the volume during the song's fade-out period.

I then commented-out the song fade-out that call the setVolume function so the song would just stop, as it initially did when I had first successfully implemented the JWPlayer, but the web-application started displaying the setup timeout error. Note, there are no setVolume calls before the setup function calls, actually all setVolume calls have been commented out, so sense there isn't anything explicitly related to volume in the setup parameter values, why this error is happening.

This error also occurs in other JWPlayer that I use on other pages in my web-app, which do not use any of the code on the page where I first noticed the problem.

I remember that there is a volume cookie talked about somewhere on the internet, could that cookie be corrupted?

I'm using JWPlayer version 7. I understand that JWPlayer version 8 doesn't play YouTube videos, which I need to do on some of my web-app's pages.

My browser is the latest version of Chrome and I'm running Windows 10 64-bit.

3 Community Answers


JW Player Support Agent  
0 rated :

I do not see any volume settings in the setup() call, so I find it unlikely that there is a conflict.

My first suggestion would be to wait until an on(‘ready’) function to change the volume to see if this causes the player to set up correctly.

Howard Brown

0 rated :

Thank you - However I found a workaround that fixed the problem.

Again, there were never any setVolume calls in my function that used the JWPlayer setup function, and after encountering this error, I commented out all of the JWPlayer setVolumes in the other JWPlayer events on the page I was testing. Even so, the error continued after this despite not having any JWPlayer setVolume calls . Also, in my original code no JWPlayer setVolume calls were ever called until the final few seconds that a song was played, well after the player was ready.

The fix that I found is based on the fact that after the JWPlayer setup function call was made, but prior to when the error message is displayed or the exception error is thrown that I sited in my original posting on this issue, a call to the JWPlayer getVolume function returned the NaN value, which you might expect since no volume was set. However, when I added a new JWPlayer setVolume function to set the volume to 30, a valid volume level, only when the NaN volume level was found, the problem no longer occurred on this page or any other that used the JWPlayer, even those pages where fix code wasn't added yet. Note, if the volume after setting it to 30 isn't changed, then the check for an invalid volume then finds 30 from the previous run, and does this on any page, with or without the fix-code.

From this, I know that the problem was related to the volume level that JWPlayer is 'remembering' from the previous player's run somehow internally being used in the JWPlayer's setup call, even though there isn't a volume properly explicitly defined in the parameter properties or set before the JWPlayer setup function call.

Thanks for your suggestion -- yes, be sure to only attempt to play a song after the JWPlayer is ready, but apparently getting and setting the volume level may safely done, and even be necessary, before playing anything in JWPlayer. This may not be necessary in versions later than 7, I simply haven't tested with those.

P.S., I'm still hoping for help with the clicking/popping problem that occurred when I was fading-out the sound near the end of the song play.


JW Player Support Agent  
0 rated :

I created a code example to test a fade out in JW8:

I do not hear any popping sounds in Chrome 64 on Mac. How does it sound for you?

This question has received the maximum number of answers.