Fix scrub cursor

This commit is contained in:
DC
2016-05-24 02:39:28 -07:00
parent 918a35e091
commit 3a8fe24eec

View File

@@ -316,6 +316,7 @@ function renderPlayerControls (state) {
<div
class='scrub-bar'
draggable='true'
ondragstart=${handleDragStart}
onclick=${handleScrub},
ondrag=${handleScrub}>
</div>
@@ -459,6 +460,14 @@ function renderPlayerControls (state) {
</div>
`
function handleDragStart (e) {
// Prevent the cursor from changing, eg to a green + icon on Mac
if (e.dataTransfer) {
var dt = e.dataTransfer
dt.effectAllowed = 'none'
}
}
// Handles a click or drag to scrub (jump to another position in the video)
function handleScrub (e) {
dispatch('mediaMouseMoved')