This commit is contained in:
1 parent
04eba4de45
commit
00875123f5
1 file changed
+6
-1
@@ -307,8 +307,13 @@ export default class AudioManager implements Disposable {
|
||||
|
||||
if (this.audioSource.type === 'url') {
|
||||
try {
|
||||
const url = new URL(this.audioSource.url);
|
||||
if (url.protocol !== 'http:' && url.protocol !== 'https:') {
|
||||
throw new Error('Unsupported audio source protocol.');
|
||||
}
|
||||
|
||||
return {
|
||||
input: new URL(this.audioSource.url).toString(),
|
||||
input: url.toString(),
|
||||
source: this.audioSource,
|
||||
};
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user