diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 000000000..1be5bccd1 --- /dev/null +++ b/.yarnrc @@ -0,0 +1 @@ +--cwd front diff --git a/front/package.json b/front/package.json index fdd077ed7..dd8f9a0ce 100644 --- a/front/package.json +++ b/front/package.json @@ -38,6 +38,7 @@ "qs": "6.11.0", "sass": "1.54.9", "showdown": "2.1.0", + "standardized-audio-context": "^25.3.32", "text-clipper": "2.2.0", "transliteration": "2.3.5", "universal-cookie": "4.0.4", diff --git a/front/public/embed.html b/front/public/embed.html index 96551b87a..96c85a992 100644 --- a/front/public/embed.html +++ b/front/public/embed.html @@ -72,8 +72,10 @@ // NOTE: Add a transcoded MP3 src at the end for browsers // that do not support other codecs to be able to play it :) - if (sources.length > 0 && !sources.some(({ type }) => type === 'audio/mpeg')) { - sources.push({ mimetype: 'audio/mpeg', listen_url: `${sources[0].listen_url}?to=mp3` }) + if (sources.length > 0 && !sources.some(({ mimetype }) => mimetype === 'audio/mpeg')) { + const url = new URL(sources[0].listen_url) + url.searchParams.set('to', 'mp3') + sources.push({ mimetype: 'audio/mpeg', listen_url: url.toString() }) } return sources diff --git a/front/src/components/audio/Player.vue b/front/src/components/audio/Player.vue index f060839aa..a8d9c75b2 100644 --- a/front/src/components/audio/Player.vue +++ b/front/src/components/audio/Player.vue @@ -1,14 +1,17 @@