···293293 break
294294 case event.target.error.MEDIA_ERR_NETWORK:
295295 console.error("A network error caused the audio download to fail.")
296296- showNetworkErrorNotificationIfNeeded.call(this)
296296+ showNetworkErrorNotification.call(this)
297297 audioStalledEvent.call(this, event)
298298 break
299299 case event.target.error.MEDIA_ERR_DECODE:
···301301 break
302302 case event.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:
303303 console.error("The audio not be loaded, either because the server or network failed or because the format is not supported.")
304304- showNetworkErrorNotificationIfNeeded.call(this)
305305- audioStalledEvent.call(this, event)
304304+ if (event.target.currentTime && event.target.currentTime > 0) {
305305+ showNetworkErrorNotification.call(this)
306306+ audioStalledEvent.call(this, event)
307307+ } else {
308308+ showUnsupportedSrcErrorNotification.call(this)
309309+ clearTimeout(this.loadingTimeoutId)
310310+ this.app.ports.setAudioIsLoading.send(false)
311311+ }
306312 break
307313 default:
308314 console.error("An unknown error occurred.")
···310316}
311317312318313313- function showNetworkErrorNotificationIfNeeded() {
319319+ function showNetworkErrorNotification() {
314320 this.app.ports.showErrorNotification.send(
315321 navigator.onLine
316322 ? "I can't play this track because of a network error. I'll try to reconnect."
317323 : "I can't play this track because we're offline. I'll try to reconnect."
324324+ )
325325+ }
326326+327327+328328+ function showUnsupportedSrcErrorNotification() {
329329+ this.app.ports.showErrorNotification.send(
330330+ "__I can't play this track because your browser didn't recognize it.__ Try checking your developer console for a warning to find out why."
318331 )
319332 }
320333