mirror of
https://github.com/koel/koel
synced 2025-02-17 22:08:28 +00:00
Do not attempt to autoplay shared URL on iOS
This commit is contained in:
parent
3e06b0fadd
commit
28b0d91c64
1 changed files with 9 additions and 1 deletions
|
@ -25,6 +25,7 @@
|
|||
<script>
|
||||
import Vue from 'vue';
|
||||
import $ from 'jquery';
|
||||
import isMobile from 'ismobilejs';
|
||||
|
||||
import siteHeader from './components/site-header/index.vue';
|
||||
import siteFooter from './components/site-footer/index.vue';
|
||||
|
@ -202,7 +203,14 @@ export default {
|
|||
if (!songId) return;
|
||||
const song = songStore.byId(songId);
|
||||
if (!song) return;
|
||||
playback.queueAndPlay(song);
|
||||
|
||||
if (isMobile.apple.device) {
|
||||
// Mobile Safari doesn't allow autoplay, so we just queue.
|
||||
queueStore.queue(song);
|
||||
loadMainView('queue');
|
||||
} else {
|
||||
playback.queueAndPlay(song);
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue