Skip to content

Commit

Permalink
fix audio transcoding with filekeys
Browse files Browse the repository at this point in the history
  • Loading branch information
9001 committed Apr 11, 2024
1 parent b772a4f commit b873365
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions copyparty/web/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1539,16 +1539,18 @@ var mpl = (function () {
set_tint();

r.acode = function (url) {
var c = true;
var c = true,
cs = url.split('?')[0];

if (!have_acode)
c = false;
else if (/\.(wav|flac)$/i.exec(url))
else if (/\.(wav|flac)$/i.exec(cs))
c = r.ac_flac;
else if (/\.(aac|m4a)$/i.exec(url))
else if (/\.(aac|m4a)$/i.exec(cs))
c = r.ac_aac;
else if (/\.(ogg|opus)$/i.exec(url) && !can_ogg)
else if (/\.(ogg|opus)$/i.exec(cs) && !can_ogg)
c = true;
else if (re_au_native.exec(url))
else if (re_au_native.exec(cs))
c = false;

if (!c)
Expand Down

0 comments on commit b873365

Please sign in to comment.