I mentioned in a previous post about my current "most annoying but" in DVD Pila! is that the spacebar pause/play functionality kills the search when inside a DVD page. I worked on it for about half an hour in between learning some Android stuff, and I think I have a solution.
Instead of putting the pause/play key binding inside the this.$().on calls, I moved it into a function tied to the Ember View keyUp event. The code now looks like this:
keyUp: function(event) {
var $vid = $(event.target)[0];
if (event.keyCode == 32 && $vid.paused == true) {
$vid.play();
} else if (event.keyCode == 32 && $vid.paused == false) {
$vid.pause();
}
},
The code worked as expected in my test environment so I went ahead and committed the code. When I synced to the production install I noticed that there was still an issue.
When you browse to a DVD page and watch a video the space pause/play does indeed work as expected, so that's good, and when doing a search the page does change the results. The problem comes up when you enter a second DVD page, hit play, then try to search for something else. The search doesn't work for some reason.
Thinking I might need to replace the groovy enter/return keybinding on the search field to an actual button. Doesn't seem as fun, but I'd like both features to work they way they are meant to.
Party On!
[dvdpila]