Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Web Design (WordPress, Joomla, etc.) switching 2 video pressing keyboard key

  • switching 2 video pressing keyboard key

    Posted by Giuliano Bausano on November 6, 2014 at 12:43 pm

    Hi everybody,
    i’m not sure in which group i should ask this question, i guess this one should fit:

    have anyone seen this? “https://www.youtube.com/user/HondaVideo?x=cs”

    Despite the good idea and the hard cinematic video work, does anyone knows (have idea or suggestion where to look for answers/solution) how to add a video into a website which switch into another video pressing a keyboard key, like that one does, please?

    Thank you very much in advance.
    Julian.

    Curtis Thompson replied 11 years, 6 months ago 2 Members · 3 Replies
  • 3 Replies
  • Curtis Thompson

    November 6, 2014 at 4:12 pm

    Hello,

    Here’s a quick fiddle i made to demonstrate this for you:

    https://jsfiddle.net/sitruc/Lqs5tm4x/1/

    It uses jquery, but as noted in the comments, that’s just for convenience. Also uses HTML5 video, but that’s safe enough these days. However you would need to catch older browsers just in case.

    Hope that helps!

    sitruc

  • Giuliano Bausano

    November 6, 2014 at 6:16 pm

    Thank you very, very much i appreciated it a lot,
    it is what i was searching for and i didn’t found anything on the web before…

    actually it looks like an array of video right? which you can cycle through, using your “j” and “k” keys.. awesome..

    in that advertising the video allow u to just switch forom one video to the other one, just pressing and realeasing R button.. something like 2 video layers.. am i wrong? what do u think about it? is it very different/hard to do it, please?

    Kind regards.

  • Curtis Thompson

    November 6, 2014 at 6:46 pm

    Hello,

    Nope – you could easily just only listen to the “r” key (in the example I posted, that’d be the “k” key) and just cycle through them. right now it loops back to the start when you get to the last video, but you could even disable that and just alert the user that they’d reached the last video.

    the “j” here just lets you go backwards – it’s not necessary to have that.

    sitruc

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy