mediaelement / mediaelement-plugins

Plugins for the main mediaelement project
405 stars 137 forks source link

Documentation accessibility - How to navigate with keyboard (a11y) #174

Open neffets opened 4 years ago

neffets commented 4 years ago

It would be helpful to documentate the usage of mediaelement by keyboard.

Thanx

neffets commented 4 years ago

I use currently following config:

    var config = {
            loop: false,
            enableAutosize: true,
            alwaysShowControls: true,
            clickToPlayPause: true,
            /* Features/Plugins */
            features: ['playpause','current','progress','duration','tracks','volume','speed','fullscreen','a11y','jumpforward'],
            hideCaptionsButtonWhenEmpty: true,
            jumpForwardInterval: 10,
            speeds: ['2.00', '1.50', '1.25', '1.00', '0.75', '0.50'],
            defaultSpeed: '1.00',
            speedChar: 'x',
            speedText: 'Speed Rate',
            /* if tracks are used */
            startLanguage: 'de',
            tracksAriaLive: true,
            /* turns keyboard support on and off for this instance */
            enableKeyboard: true,
            pauseOtherPlayers: true,
            /* 13 = ENTER, 32 = SPACE, 179 = Google-Play/Pause-button keys: [13, 32, 179] */
            keyActions: [
                { keys: [32, 179], action: function(player,media) { (player.paused||player.ended) ? player.play() : player.pause() } }
            ],
            /* youtube specials */
            usePluginFullScreen: false,
            youtubeIframeVars: { nocookie: true, hl: loadjs.lang, controls: 2, rel:0, cc_load_policy: 1, iv_load_policy: 1 },
            youtube: { nocookie: true, hl: loadjs.lang, controls: 2, rel:0, cc_load_policy: 1, iv_load_policy: 1 },
    }
neffets commented 4 years ago

What I found:

Generally:

The "speed"-plugin haves some issues with keyboard in the select-list the up/down-key gets you only one up/down and then auto-selects options. It should better work the same way, like the tracks-CC-implementation.

jaapmarcus commented 4 years ago

esc to exit full screen as alternative for exit fullscreen... See https://github.com/mediaelement/mediaelement/search?q=keyCode&unscoped_q=keyCode

For al the uses of keyCode.