Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding keyboard pause/play to video element #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

weotch
Copy link
Member

@weotch weotch commented Mar 26, 2021

Adding keyboard control to videos for better accessibility support.

Comment on lines +120 to +124
methods:
togglePause: (e) ->
if e.target.paused
then e.target.play()
else e.target.pause()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brokenhd can you move this method into https://github.com/BKWLD/vue-visual/blob/master/concerns/supports-videos.coffee since it's fundamentally video related?

Also, how about togglePlayback() as the method name?

Lastly, you can use the existing @play() and @pause() methods for this, which would be good in case we add additional behaviors onto those methods. Like how @play() also starts loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants