Guest User

Untitled

a guest
Jan 18th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. this.playhead.nativeElement.addEventListener('mousedown', this.mouseDownEvent.bind(this));
  2. window.addEventListener('mouseup', this.mouseUpEvent.bind(this));
  3.  
  4. mouseDownEvent(ev: any) {
  5. this.mouseDownOnPlayhead = true;
  6. this.pause();
  7. window.addEventListener('mousemove', this.manuallyMovePlayhead.bind(this), true);
  8. }
  9.  
  10. mouseUpEvent(ev: any) {
  11. window.removeEventListener('mousemove', this.manuallyMovePlayhead.bind(this), true);
  12. this.mouseDownOnPlayhead = false;
  13. }
  14.  
  15. manuallyMovePlayhead() {
  16. ... // Do Stuff
  17. }
Add Comment
Please, Sign In to add comment