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, clickLink: null,
cuts: [], cuts: [],
duration: 0, duration: 0,
enableDownload: false,
enableSubtitles: false, enableSubtitles: false,
find: '', find: '',
fullscreen: false, fullscreen: false,
@ -84,6 +85,7 @@ Ox.VideoPanel = function(options, self) {
censored: self.options.censored, censored: self.options.censored,
controlsTop: ['fullscreen', 'title', 'find'], controlsTop: ['fullscreen', 'title', 'find'],
controlsBottom: ['play', 'volume', 'scale', 'timeline', 'position', 'settings'], controlsBottom: ['play', 'volume', 'scale', 'timeline', 'position', 'settings'],
enableDownload: self.options.enableDownload,
enableFind: true, enableFind: true,
enableKeyboard: true, enableKeyboard: true,
enableMouse: true, enableMouse: true,
@ -107,6 +109,9 @@ Ox.VideoPanel = function(options, self) {
width: getPlayerWidth() width: getPlayerWidth()
}) })
.bindEvent({ .bindEvent({
download: function(data) {
that.triggerEvent('downloadvideo', data);
},
find: function(data) { find: function(data) {
self.$timeline.options({find: data.find}); self.$timeline.options({find: data.find});
self.$annotationPanel.options({highlight: 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. empty space that separates left-aligned from right-aligned controls.
controlsTop <[s]|[]> Top controls, from left to right controlsTop <[s]|[]> Top controls, from left to right
duration <n|-1> Duration (sec) duration <n|-1> Duration (sec)
enableDownload <b|false> If true, enable download
enableFind <b|false> If true, enable find enableFind <b|false> If true, enable find
enableFullscreen <b|false> If true, enable fullscreen enableFullscreen <b|false> If true, enable fullscreen
enableKeyboard <b|false> If true, enable keyboard controls enableKeyboard <b|false> If true, enable keyboard controls