mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 01:53:40 +08:00
FIX: uses CDN when available for chat mp3 sounds (#19341)
This commit is contained in:
parent
58ffa06d4a
commit
4e92a6e804
|
@ -1,6 +1,7 @@
|
|||
import Service from "@ember/service";
|
||||
import { debounce } from "discourse-common/utils/decorators";
|
||||
import { isTesting } from "discourse-common/config/environment";
|
||||
import { getURLWithCDN } from "discourse-common/lib/get-url";
|
||||
|
||||
const AUDIO_DEBOUNCE_DELAY = 3000;
|
||||
|
||||
|
@ -17,7 +18,7 @@ const createAudioCache = (sources) => {
|
|||
sources.forEach(({ type, src }) => {
|
||||
const source = document.createElement("source");
|
||||
source.type = type;
|
||||
source.src = src;
|
||||
source.src = getURLWithCDN(src);
|
||||
audio.appendChild(source);
|
||||
});
|
||||
return audio;
|
||||
|
|
Loading…
Reference in New Issue
Block a user