Only show previews for video

This commit is contained in:
David Ernst
2020-05-01 21:05:29 -07:00
parent 0b57961ff7
commit 85c0e99e16

View File

@@ -728,7 +728,7 @@ function renderPlayerControls (state) {
// Handles a scrub hover (preview another position in the video)
function handleScrubPreview (e) {
if (!e.clientX) return
if (!e.clientX || state.playing.type !== 'video') return
dispatch('mediaMouseMoved')
const windowWidth = document.querySelector('body').clientWidth
const fraction = e.clientX / windowWidth