Fix some ogg urls not working on iOS

This commit is contained in:
KatieFrogs 2022-03-05 08:39:16 +03:00
parent 6f984e6588
commit 38963479bc

View File

@ -33,10 +33,17 @@ class RemoteFile{
if(this.path.startsWith("/")){ if(this.path.startsWith("/")){
this.path = this.path.slice(1) this.path = this.path.slice(1)
} }
this.name = this.path if(this.url.startsWith("data:")){
var index = this.name.lastIndexOf("/") this.name = "datauri"
if(index !== -1){ if(this.url.startsWith("data:audio/ogg")){
this.name = this.name.slice(index + 1) this.name += ".ogg"
}
}else{
this.name = this.path
var index = this.name.lastIndexOf("/")
if(index !== -1){
this.name = this.name.slice(index + 1)
}
} }
} }
arrayBuffer(){ arrayBuffer(){