gearheads
/
mastodon
Archived
2
0
Fork 0

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

gh/stable
Sho Kusano 2017-10-19 00:13:51 +09:00 committed by Eugen Rochko
parent 3810d98cd8
commit 09d81defcd
1 changed files with 5 additions and 1 deletions

View File

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