Space Bar Play/Pause Video

Is it possible to call on the space bar or Enter key via JavaScript to both play and pause a video on scene load? What code would I use to accomplish that function? Thanks!

Found this by using the term key events on this at the top of the forum page :grin:

1 Like

Thanks so very much!

1 Like

I used the Enter key, but could not find the key code for the spacebar.

Have you done a search for this any where?

Or better yet used the console to see what key is pressed when you log the key event.

How do I use the Console to see key codes?

Found the spacebar key code = 32.

http://keycode.info

1 Like

So I was a little bored and a video would be too big to upload .
Have a look at this..

console.zip (2.6 MB)

1 Like

Awesome! Thanks again.