Override and/or listen to button control events

Topics: Windows 8 JavaScript
Sep 16, 2014 at 8:37 PM
I would like the video player to do a few other actions (aside from the default actions) once the skip previous or skip next buttons are clicked. Is there any way to override the default behavior? Is there anyway to hear when those buttons are clicked?
Sep 17, 2014 at 1:39 AM
I found a way to do this, but I am unsure if it is the best or recommended way. This is how I did it:

var btnPrev = document.querySelector("button.pf-skip-previous-control").winControl;
btnPrev.onclick = skipToPreviousVideo;

function skipToPreviousVideo(e){
//perform skip operation here