How can I play a HTML5 or Flash video with keyboard shortcuts on a system without a mouse?

2

1

Original Question

The Firefox help pages state:

After you click on the media on a web page, to give it focus, you can control the playback with your keyboard.

But how can we initially give it focus if we are not using a mouse

Edits

Since I cannot provide a link to the video page, here is the relevant page source:

<div class="my-account">
    <p class="back-link">
        <a href="https://shop.dananddave.com/streaming/customer/products/">
            <small>&laquo;</small>Back to My Streaming Videos</a>
    </p>
    <div class="page-title">
         <h1>The Unreal Work, vol. 1 - <span id="streaming-link-titile">PaulWilson</span></h1>
    </div>
    <div id="my-streaming-product">
        <iframe src="https://player.vimeo.com/video/55133774?show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=000000&amp;fullscreen=1&amp;autoplay=0" height="100%" width="100%" frameborder="0"></iframe>
    </div>
    <div class="buttons-set">
        <p class="back-link">
            <a href="https://shop.dananddave.com/streaming/customer/products/">
                <small>&laquo;</small>Back to My Streaming Videos</a>
        </p>
    </div>
</div>

Shaun Luttin

Posted 2014-10-05T01:22:24.157

Reputation: 1 911

Good question. There are keyboard shortcuts for FireFox but unclear how focus would be set. With Flash one would just tab between elements. https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly#w_media-shortcuts

– JakeGould – 2014-10-05T01:29:37.890

Answers

0

If the video element has the controls attribute (i.e., Firefox shall use its own control menu), you can use Tab to focus the video player. When it has focus, you can use the keyboard controls.

If the video element doesn’t have the controls attribute, it’s the author’s responsibility to provide a control menu – and then you’d have to hope that the author had keyboard accessibility in mind.

However, for such a video it might work to focus the player (with Tab) and open the context menu (for example, via Shift+F10), where you can enable the default controls. After this, it should be possible to use the default keyboard controls. (I couldn’t test it with many videos, so it might depend on the author’s script.)

unor

Posted 2014-10-05T01:22:24.157

Reputation: 2 749

I tried all of those methods, and for this particular video, I wasn't able to obtain focus. I ended up using the JavaScript console of Firefox to call the .focus() event on the darn thing. – Shaun Luttin – 2014-10-07T00:23:56.623

@ShaunLuttin: Could you provide a link to this video? – unor – 2014-10-08T11:26:07.987

Unfortunately I cannot provide a link, because it's a secure video served within a protected user account. I can tell you, though, that the video is within a Vimeo embed. – Shaun Luttin – 2014-10-09T16:10:02.383

I added relevant page source in lieu of a link to the video. – Shaun Luttin – 2014-10-09T16:22:23.220

0

press Tab repeatedly until the video is focused then press context menu (looks like a box with three lines) to get controls like play and pause or use the keyboard shortcuts provided by firefox

DividedByZero

Posted 2014-10-05T01:22:24.157

Reputation: 280

I have not be able to obtain focus on the element with tab. – Shaun Luttin – 2014-10-07T00:26:55.240