mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 07:21:50 +08:00
Fix some ogg urls not working on iOS
This commit is contained in:
parent
6f984e6588
commit
38963479bc
@ -33,12 +33,19 @@ class RemoteFile{
|
|||||||
if(this.path.startsWith("/")){
|
if(this.path.startsWith("/")){
|
||||||
this.path = this.path.slice(1)
|
this.path = this.path.slice(1)
|
||||||
}
|
}
|
||||||
|
if(this.url.startsWith("data:")){
|
||||||
|
this.name = "datauri"
|
||||||
|
if(this.url.startsWith("data:audio/ogg")){
|
||||||
|
this.name += ".ogg"
|
||||||
|
}
|
||||||
|
}else{
|
||||||
this.name = this.path
|
this.name = this.path
|
||||||
var index = this.name.lastIndexOf("/")
|
var index = this.name.lastIndexOf("/")
|
||||||
if(index !== -1){
|
if(index !== -1){
|
||||||
this.name = this.name.slice(index + 1)
|
this.name = this.name.slice(index + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
arrayBuffer(){
|
arrayBuffer(){
|
||||||
return loader.ajax(this.url, request => {
|
return loader.ajax(this.url, request => {
|
||||||
request.responseType = "arraybuffer"
|
request.responseType = "arraybuffer"
|
||||||
|
Loading…
Reference in New Issue
Block a user