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

master
Sho Kusano 7 years ago committed by Eugen Rochko
parent 3810d98cd8
commit 09d81defcd
  1. 4
      app/javascript/mastodon/middleware/sounds.js

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

Loading…
Cancel
Save