I just tried this plugin out and I must say it's a great piece of
work!
I'm in the process of implementing it right now and have found one
probable bug. The volume function ($(id).jPlayer( "volume", Number:
percent ) : jQuery) only changes the volume bar and not the actual
volume of the sound, should be an easy fix I guess?
/ Jonathan
I will review this, but I did test the volume on all browsers and it
worked. It is possible that I missed it. To aid my review would you
please provide:
1) A dev URL of your project
2) Name the browsers you found this problem on.
3) What OS you use, Eg., Windows Vista
Best regards,
Mark P.
I have noticed that this error exists in Google Chrome 4.0.249.89 on
my Windows Vista (64-bit SP1) machine. If you can test it under the
same conditions you will notice that if you set the volume to (for
example) 50% you will lower the volume, even though default is 20%.
Changing the volume works fine in two other browsers I have tested,
namely: IE7 and Firefox 3.0.18.
My dev-url is: http://bigspin.se/myjam/
Thanks a lot for helping out!
/ Jonathan
You appear to have found a problem with the volume. However, I would
describe the problem differently. The volume setting a has no effect
when changing to a new track using setFile, when using Chrome 4. So
setting the initial volume to 20% and then changing to 50% does lower
the volume, since the initial 20% setting has no effect and the volume
was actually at 100%.
My testing must have missed that the volume is not working correctly
in Chrome 4 (or Chrome 5 beta). Chrome 4 uses the HTML5 solution for
the audio, whereas IE7 and FF3 use the Flash solution. I will test
this on other HTML5 browsers to see if this affects those too.
Firefox 3.6 (while using HTML5 audio / OGG files works) with the
initial volume setting and carries the volume setting over when
changing track using setFile.
Safari 4 (while using HTML5 audio / MP3 files works) with the initial
volume setting and carries the volume setting over when changing track
using setFile.
I can confirm that this only affects the Chrome 4 browser. This
happens when using either MP3 files or OGG files when using the HTML5
audio solution. When {nativeSupport:false} the Flash is used and I can
confirm that this works correctly in Chrome 4.
This problem only affects Chrome 4 while using HTML5 audio.
I will investigate this problem and see if a fix can be found that
solves the Chrome 4 problem.
(Reviewing the previous release, 0.2.5, it was found that Chrome 4 has
the same problem with the volume.)
Thank you for reporting this problem Jonathan, I will let you know
when I find a solution.
If I was to make an educated guess though, it would be that Chrome 4
requires that the volume is set AFTER the src is defined.
ie., File jquery.jplayer.js: moving line 271:
self.config.audio.volume = self.config.volume/100;
...down to after line line 283 (Inside the if() { scope }):
self.config.audio.src = self.config.diag.src;
During my development, I have found that HTML5 audio is a little
peculiar in places and tends to need 'a little time to warm up'. While
Chrome 4 supports both OGG and MP3 files, it appears to perform worst
out of the three HTML5 browsers (1st:Safari4, 2nd:Firefox3.6,
3rd:Chrome4). In particular when changing the play head time to a new
value, or when stopping and then playing the track from the beginning.
Best regards,
Mark P.
I will add this to the list of issues to be solved in jPlayer 1.0.1
Best regards,
Mark P.
I proved this by the brute force setting of the volume in the
if(audio.readyState >= 1) clause of the jPlayerController(). This
solution, while it did fix the volume, is not good since it causes the
first 100ms or so of the sound to be at 100% before changing to the
correct volume setting. This then affected: safari4, FF3.6 and
Chrome4.
I will continue to look for a solution, but it will not be until later
in the week.
Best regards,
Mark P.
I will continue to look into a solution in the meantime.
Best regards,
Mark P.
Comment out line 271:
// self.config.audio.volume = self.config.volume/100;
Add at end of setFile() event (eventsForHtmlAudio) inside the
{ scope } line 280:
self.config.audio.addEventListener("canplay", function(evt) {
self.config.audio.volume = self.config.volume/100;
}, false);
This solution appears to work across Chrome 4, Safari 4 and FF3.6.
I will test this some more of course, but expect that this change will
be in the next release as it is shown here.
Best regards,
Mark P.
On Feb 24, 1:04 pm, Mark P <mark.panaghis...@gmail.com> wrote:
> The problem with the volume in Chrome is a known issue... Known by
> Chromium:
>
> http://code.google.com/p/chromium/issues/detail?id=33023&q=audio%20vo...
I will be using GitHub to release minor patches.
Best regards,
Mark P.
/ J