From 56c1bf2af09c54eccef4d5638a3614ff4fa4e981 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 19 Feb 2012 19:06:25 +0000 Subject: [PATCH] enable download, fixed #467 --- source/Ox.UI/js/Video/Ox.VideoPanel.js | 5 +++++ source/Ox.UI/js/Video/Ox.VideoPlayer.js | 1 + 2 files changed, 6 insertions(+) diff --git a/source/Ox.UI/js/Video/Ox.VideoPanel.js b/source/Ox.UI/js/Video/Ox.VideoPanel.js index e23f972d..9916787b 100644 --- a/source/Ox.UI/js/Video/Ox.VideoPanel.js +++ b/source/Ox.UI/js/Video/Ox.VideoPanel.js @@ -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}); diff --git a/source/Ox.UI/js/Video/Ox.VideoPlayer.js b/source/Ox.UI/js/Video/Ox.VideoPlayer.js index 6d7296cc..e4b62816 100644 --- a/source/Ox.UI/js/Video/Ox.VideoPlayer.js +++ b/source/Ox.UI/js/Video/Ox.VideoPlayer.js @@ -19,6 +19,7 @@ Ox.VideoPlayer Generic Video Player empty space that separates left-aligned from right-aligned controls. controlsTop <[s]|[]> Top controls, from left to right duration Duration (sec) + enableDownload If true, enable download enableFind If true, enable find enableFullscreen If true, enable fullscreen enableKeyboard If true, enable keyboard controls