Only show previews for video
This commit is contained in:
@@ -728,7 +728,7 @@ function renderPlayerControls (state) {
|
|||||||
|
|
||||||
// Handles a scrub hover (preview another position in the video)
|
// Handles a scrub hover (preview another position in the video)
|
||||||
function handleScrubPreview (e) {
|
function handleScrubPreview (e) {
|
||||||
if (!e.clientX) return
|
if (!e.clientX || state.playing.type !== 'video') return
|
||||||
dispatch('mediaMouseMoved')
|
dispatch('mediaMouseMoved')
|
||||||
const windowWidth = document.querySelector('body').clientWidth
|
const windowWidth = document.querySelector('body').clientWidth
|
||||||
const fraction = e.clientX / windowWidth
|
const fraction = e.clientX / windowWidth
|
||||||
|
|||||||
Reference in New Issue
Block a user