Documentation

Keyboard navigation

Keyboard navigation works fine in top level window. But if player is embeded in iframe, you should send post message from window with player to parent window.

For example to send post message your code can looks like below:

function getOpener() {
    var parent = null;
    if (window.parent != null && window.parent.postMessage != null) {
        parent = window.parent;
    }
    if (window.opener != null && window.opener.postMessage != null) {
        parent = window.opener;
    }
    return parent;
}

player.onPageScrollTo(function (top) {
    var parent = getOpener();
     if (parent) {
         parent.postMessage('SCROLLTOP:' + top, "*");
     }
 });

and to receive message in main(top) window, you should add the following code:

window.addEventListener("message", receiveMessage, false);

function receiveMessage(event) {
    var data;
    if (data.indexOf("SCROLLTOP:") == 0) {
        onScrollMessage(event.data.substring('SCROLLTOP:'.length));
    }
}