Do not attempt to autoplay shared URL on iOS

This commit is contained in:
An Phan 2016-07-08 10:27:34 +08:00
parent 3e06b0fadd
commit 28b0d91c64
No known key found for this signature in database
GPG key ID: 05536BB4BCDC02A2

View file

@ -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);
}
},
});
},