Skipping setting preload attribute and events on an audio tag on mobile devices

This commit is contained in:
Pavle Goloskokovic 2018-01-17 14:05:35 +01:00
parent b33af6d2aa
commit 402aa27ff3

View file

@ -74,12 +74,13 @@ var HTML5AudioFile = new Class({
var audio = new Audio();
audio.name = this.key + ('0' + i).slice(-2); // Useful for debugging
audio.dataset.used = 'false';
if (!('ontouchstart' in window))
{
audio.preload = 'auto';
// TODO check if ios is locked
audio.oncanplaythrough = this.onProgress.bind(this);
audio.onerror = this.onError.bind(this);
}
this.data.push(audio);
}