To enable skipping and rewinding for your viewers by using the arrow keys, just add this code to the page where your video is embedded, BELOW the video code.

*Remember to change the 'vidalytics_embed_XXXXXXX' with your own embed ID.

<script>

var EMBED_CODE_ID = 'vidalytics_embed_XXXXXXX';

var vidalyticsPlayerAPI = null; function initializePlayerAPI() {
console.log('initializePlayerAPI()');
var player = getPlayer();
if (player._player) {
vidalyticsPlayerAPI = player;
onPlayerAPIAvailableCallback();
return;
}

setTimeout(initializePlayerAPI, 100);
}

initializePlayerAPI(); function getPlayer() {
console.log('getPlayer()');
var embeds = (_vidalytics || {}).embeds || {};
if (embeds[EMBED_CODE_ID]) {
return embeds[EMBED_CODE_ID].player || {};
}

return {};
}

function onPlayerAPIAvailableCallback() {
console.log("onPlayerAPIAvailableCallback()");
document.onkeydown = checkKey;
} function checkKey(e) {
e = e || window.event;
if (e.keyCode == '37') {
var newTime = Math.max(vidalyticsPlayerAPI.getCurrentVideoTime() - 7, 0);
vidalyticsPlayerAPI.seekTo(newTime);
}

else if (e.keyCode == '39') {
var newTime = Math.min(vidalyticsPlayerAPI.getCurrentVideoTime() + 7, vidalyticsPlayerAPI._player.getDuration());
vidalyticsPlayerAPI.seekTo(newTime);
}
} </script>
Did this answer your question?