logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 09d81defcda96eae7ffba36ccf1fb091ce08f17b
parent: 3810d98cd8423f78ad14ba53bdfdd1caf82e62ba
Author: Sho Kusano <rosylilly@aduca.org>
Date:   Thu, 19 Oct 2017 00:13:51 +0900

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


Diffstat:

Mapp/javascript/mastodon/middleware/sounds.js6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/app/javascript/mastodon/middleware/sounds.js b/app/javascript/mastodon/middleware/sounds.js @@ -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();