Suppress type error(not a function) on calling fastSeek (#5452)

th-downstream
Sho Kusano 7 years ago committed by Eugen Rochko
parent b222a9d5ee
commit 85e47a4423

@ -12,7 +12,11 @@ const createAudio = sources => {
const play = audio => {
if (!audio.paused) {
audio.pause();
audio.fastSeek(0);
if (typeof audio.fastSeek === 'function') {
audio.fastSeek(0);
} else {
audio.seek(0);
}
}
audio.play();

Loading…
Cancel
Save