enable download, fixed #467

This commit is contained in:
j 2012-02-19 19:06:25 +00:00
parent 8964fdcd58
commit 56c1bf2af0
2 changed files with 6 additions and 0 deletions

View file

@ -26,6 +26,7 @@ Ox.VideoPanel = function(options, self) {
clickLink: null,
cuts: [],
duration: 0,
enableDownload: false,
enableSubtitles: false,
find: '',
fullscreen: false,
@ -84,6 +85,7 @@ Ox.VideoPanel = function(options, self) {
censored: self.options.censored,
controlsTop: ['fullscreen', 'title', 'find'],
controlsBottom: ['play', 'volume', 'scale', 'timeline', 'position', 'settings'],
enableDownload: self.options.enableDownload,
enableFind: true,
enableKeyboard: true,
enableMouse: true,
@ -107,6 +109,9 @@ Ox.VideoPanel = function(options, self) {
width: getPlayerWidth()
})
.bindEvent({
download: function(data) {
that.triggerEvent('downloadvideo', data);
},
find: function(data) {
self.$timeline.options({find: data.find});
self.$annotationPanel.options({highlight: data.find});

View file

@ -19,6 +19,7 @@ Ox.VideoPlayer <f> Generic Video Player
empty space that separates left-aligned from right-aligned controls.
controlsTop <[s]|[]> Top controls, from left to right
duration <n|-1> Duration (sec)
enableDownload <b|false> If true, enable download
enableFind <b|false> If true, enable find
enableFullscreen <b|false> If true, enable fullscreen
enableKeyboard <b|false> If true, enable keyboard controls