vue-plyr
vue-plyr copied to clipboard
Videos do not pause on click on Android
Once a user clicks the large play icon - they cannot pause the video by re-clicking the video like they can on desktop.
I have the same problem. There is no play icon shown and the user can't pause the video on mobile. This occurs on Android as well as iOS.
this worked for me:
mounted() {
const videoWrapper = document.getElementsByClassName("plyr__video-wrapper")[0];
videoWrapper.addEventListener("click", event => {
this.$refs.plyr.player.togglePlay();
event.stopPropagation(); // Necessary or the video will toggle twice => no playback
});
},