mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-30 08:16:17 +01:00
Suppress type error(not a function) on calling fastSeek (#5452)
This commit is contained in:
parent
3810d98cd8
commit
09d81defcd
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user