forked from 0x2620/oxjs
add enableMouse option to VideoPlayer
This commit is contained in:
parent
3203556b46
commit
9d0dee01e8
5 changed files with 13 additions and 6 deletions
|
|
@ -170,6 +170,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
['play', 'playInToOut', 'volume', 'size', 'space', 'position'] :
|
||||
['goto', 'set', 'space', 'position'],
|
||||
duration: self.options.duration,
|
||||
enableMouse: true,
|
||||
externalControls: true,
|
||||
find: self.options.find,
|
||||
height: self.sizes.player[i].height,
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ Ox.VideoPanelPlayer = function(options, self) {
|
|||
controlsBottom: ['play', 'volume', 'timeline', 'position', 'resolution'],
|
||||
enableFind: true,
|
||||
enableKeyboard: true,
|
||||
enableMouse: true,
|
||||
height: getPlayerHeight(),
|
||||
muted: self.options.muted,
|
||||
paused: true,
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ Ox.VideoPlayer <f> Generic Video Player
|
|||
enableFind <b|false> If true, enable find
|
||||
enableFullscreen <b|false> If true, enable fullscreen
|
||||
enableKeyboard <b|false> If true, enable keyboard controls
|
||||
enableMouse <b|false> If true, click toggles paused
|
||||
externalControls <b|false> If true, controls are outside the video
|
||||
find <s|''> Query string
|
||||
focus <s|'click'> focus on 'click', 'load' or 'mouseover'
|
||||
|
|
@ -257,7 +258,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
if (self.options.type == 'play') {
|
||||
|
||||
self.$videoContainer.bind({
|
||||
self.options.enableMouse && self.$videoContainer.bind({
|
||||
click: function(e) {
|
||||
if (!$(e.target).is('.OxLogo')) {
|
||||
togglePaused();
|
||||
|
|
@ -291,7 +292,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
} else {
|
||||
|
||||
self.$videoContainer.bind({
|
||||
self.options.enableMouse && self.$videoContainer.bind({
|
||||
click: function(e) {
|
||||
if (!$(e.target).is('.OxLogo')) {
|
||||
goToPoint();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue