Skip to content

Commit

Permalink
Start subtitle offset integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Some Popcorn Time Contributor authored and SlashmanX committed May 8, 2014
1 parent 69bb31d commit f8cd500
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dependencies": {
"marionette": "~1.8.3",
"bootstrap": "~3.1.1",
"video.js-popcorn": "4.5.5",
"video.js-popcorn": "4.6.0",
"videojs-youtube": "1.1.0",
"mousetrap": "~1.4.6"
}
Expand Down
16 changes: 16 additions & 0 deletions src/app/lib/views/player/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@
_this.toggleFullscreen();
});

Mousetrap.bind('h', function(e) {
_this.increaseSubtitleOffset();
});

Mousetrap.bind('g', function(e) {
_this.decreaseSubtitleOffset();
});

Mousetrap.bind(['space', 'p'], function(e) {
$(".vjs-play-control").click();
});
Expand Down Expand Up @@ -124,6 +132,14 @@
}
},

increaseSubtitleOffset: function() {
this.video.player().setOffset(this.video.player().offset() + 0.1);
},

decreaseSubtitleOffset: function() {
this.video.player().setOffset(this.video.player().offset() - 0.1);
},

onClose: function() {
App.vent.trigger('stream:stop');
}
Expand Down

0 comments on commit f8cd500

Please sign in to comment.