jplayer / jPlayer

jPlayer : HTML5 Audio & Video for jQuery
http://jplayer.org/
Other
4.6k stars 1.47k forks source link

Aurora JS is buggy #281

Open IrosTheBeggar opened 9 years ago

IrosTheBeggar commented 9 years ago

I'm trying to use Aurora to get flac support, but I'm running into a few problems. I've got the following code:

    var jPlayer = $("#jquery_jplayer_1").jPlayer({
        ready: function () {
            $('#jquery_jplayer_1').jPlayer("setMedia", {
                flac: 'audiofiles/BIS1536-001-flac_16.flac',
            });
        },
        solution: 'aurora,html,flash',
        auroraFormats: 'flac',
        swfPath: "jPlayer/dist/jplayer/jquery.jplayer.swf",
        supplied: "mp3,flac",
        smoothPlayBar: true,
        keyEnabled: true,
        // audioFullScreen: true
    });

This runs into a few problems. The bigest problem is on chrome it doesn't work most of the time. Sometimes though the flac file loads just fine and everything works as expected. On Firefox this works everytime.

another problem is I can't load in mp3's. If I try setting the media to an mp3 file, nothign will happen. If I change the solution line to

solution: 'html,flash,aurora',

mp3 files will work but I can no longer load flac files.

Any ideas what might be wrong?

Afterster commented 9 years ago

Aurora support is marked as experimental because of this kind of issue. This is generally directly related to Aurora.js decoders and there is regular bug fix on their side. If this is an Aurora.js issue, you should have JavaScript error on your console, do you?

Phyks commented 8 years ago

This is the exact same issue as encountered in Ampache.

It is indeed a jPlayer or Aurora issue, and no error is sent to the log.

Phyks commented 8 years ago

I tracked down the issue to be here. Contrary to flash, aurora never gets "desired" when in a mixed playlist. Then, it is never used.

Also, in such case, there should be an "unsupported" message which is not shown.

I will try to submit a PR to fix this.

EDIT: Strange thing is that with just "html" and "aurora" solutions (in this order), aurora is not desired. If I add "flash" after them in the array, aurora gets desired.

Phyks commented 8 years ago

Here is the PR to fix it.

AshotN commented 4 years ago

Aurora shouldn't really be needed anymore as nearly all modern browsers support FLAC natively.

raghavendra89 commented 3 years ago

@AshotN So will jPlayer play .flac files without Aurora?

AshotN commented 3 years ago

It should, if I recall correctly jPlayer will use your browsers native support and then Aurora was meant to polyfill. But since FLAC has been supported for years now, Aurora is essentially useless for 99% of people.

I am not sure what your interest in jPlayer is. But I wouldn't recommend using it as it hasn't been touched in 3 years.

raghavendra89 commented 3 years ago

Thanks! jPlayer still works great for us. Also I found the solution. Now you can play flac audios in jPlayer without Aurora. All most all browsers now support flac codec. But the new mimetype for flac is flac and jplayer uses mimetype x-flac which prevents it from playing flac audios.

So changing the mimetype on this line to flac will make the jplayer play flac audios.

AshotN commented 3 years ago

I don't know what your use case is, but I would find something maintained.