diff --git a/source/Ox.UI/js/Video/Ox.VideoEditor.js b/source/Ox.UI/js/Video/Ox.VideoEditor.js index 80c6e748..2ed45799 100644 --- a/source/Ox.UI/js/Video/Ox.VideoEditor.js +++ b/source/Ox.UI/js/Video/Ox.VideoEditor.js @@ -1006,11 +1006,23 @@ Ox.VideoEditor = function(options, self) { } }; + /*@ + addAnnotation add annotation + (layer, item) -> add annotation to layer + layer layer id + item annotation to add + @*/ that.addAnnotation = function(layer, item) { var i = Ox.getPositionById(self.options.layers, layer); self.$annotationPanel[i].addItem(item); }; + /*@ + removeAnnotations add annotation + (layer, ids) -> remove annotation from layer + layer layer id + ids array of item ids to remove + @*/ that.removeAnnotations = function(layer, ids) { var i = Ox.getPositionById(self.options.layers, layer); self.$annotationPanel[i].removeItems(ids); diff --git a/source/Ox.UI/js/Video/Ox.VideoEditorPlayer.js b/source/Ox.UI/js/Video/Ox.VideoEditorPlayer.js index 5f39a2da..117d6191 100644 --- a/source/Ox.UI/js/Video/Ox.VideoEditorPlayer.js +++ b/source/Ox.UI/js/Video/Ox.VideoEditorPlayer.js @@ -386,37 +386,58 @@ Ox.VideoEditorPlayer = function(options, self) { } } + /*@ + mute mute + @*/ that.mute = function() { self.$video.mute(); return that; }; + /*@ + pause pause + @*/ that.pause = function() { self.$video.pause(); return that; }; + /*@ + play play + @*/ that.play = function() { self.$video.play(); return that; }; + /*@ + playInToOut playInToOut + @*/ that.playInToOut = function() { self.$video.paused() && self.$playButton.toggleTitle(); self.$video.playInToOut(); return that; }; + /*@ + toggleMute toggleMute + @*/ that.toggleMute = function() { self.$muteButton.trigger('click'); return that; } + /*@ + togglePlay togglePlay + @*/ that.togglePlay = function() { self.$playButton.trigger('click'); return that; } + /*@ + unmute unmute + @*/ that.unmute = function() { self.$video.unmute(); return that; diff --git a/source/Ox.UI/js/Video/Ox.VideoElement.js b/source/Ox.UI/js/Video/Ox.VideoElement.js index cec4646f..51ad51a3 100644 --- a/source/Ox.UI/js/Video/Ox.VideoElement.js +++ b/source/Ox.UI/js/Video/Ox.VideoElement.js @@ -1,5 +1,14 @@ // vim: et:ts=4:sw=4:sts=4:ft=javascript +/*@ +Ox.VideoElement VideoElement Object + () -> VideoElement Object + (options) -> VideoElement Object + (options, self) -> VideoElement Object + options Options object + self shared private variable +@*/ + Ox.VideoElement = function(options, self) { self = self || {}; @@ -267,15 +276,24 @@ Ox.VideoElement = function(options, self) { }); } + /*@ + animate animate + @*/ that.animate = function() { self.$video.animate.apply(self.$video, arguments); return that; - } + }; + /*@ + buffered buffered + @*/ that.buffered = function() { return self.video.buffered; }; + /*@ + currentTime get/set currentTime + @*/ that.currentTime = function() { var ret; self.ended = false; @@ -288,6 +306,9 @@ Ox.VideoElement = function(options, self) { return ret; }; + /*@ + css css + @*/ that.css = function() { var interval; if (self.$video) { @@ -304,25 +325,40 @@ Ox.VideoElement = function(options, self) { return that; }; + /*@ + duration duration + @*/ that.duration = function() { // 86399 return self.items[self.currentItem].duration; }; + /*@ + muted get/set muted + @*/ that.muted = function() { return getset('muted', arguments[0]); }; + /*@ + points get points + @*/ that.points = function() { return self.items[self.currentItem].points; }; + /*@ + pause pause + @*/ that.pause = function() { self.paused = true; self.video.pause(); return that; }; + /*@ + play play + @*/ that.play = function() { if (self.ended) { that.currentTime(0); @@ -333,16 +369,25 @@ Ox.VideoElement = function(options, self) { return that; }; + /*@ + playNext play next + @*/ that.playNext = function() { Ox.print('PLAY NEXT') setCurrentItem(self.currentItem + 1); self.video.play(); }; + /*@ + playPrevious play previous + @*/ that.playPrevious = function() { setCurrentItem(self.currentItem - 1); }; + /*@ + src get/set src + @*/ that.src = function() { var ret; if (arguments.length == 0) { @@ -360,14 +405,23 @@ Ox.VideoElement = function(options, self) { return ret; }; + /*@ + videoHeight get videoHeight + @*/ that.videoHeight = function() { return self.video.videoHeight; }; + /*@ + videoWidth get videoWidth + @*/ that.videoWidth = function() { return self.video.videoWidth; }; + /*@ + volume get/set volume + @*/ that.volume = function(value) { return getset('volume', arguments[0]); } diff --git a/source/Ox.UI/js/Video/Ox.VideoPanelPlayer.js b/source/Ox.UI/js/Video/Ox.VideoPanelPlayer.js index 15ff0125..1b02f689 100644 --- a/source/Ox.UI/js/Video/Ox.VideoPanelPlayer.js +++ b/source/Ox.UI/js/Video/Ox.VideoPanelPlayer.js @@ -260,11 +260,19 @@ Ox.VideoPanelPlayer = function(options, self) { } } + /*@ + toggleAnnotations toggle annotations + () -> toggle visibility of annotations + @*/ that.toggleAnnotations = function() { that.$element.toggle(1); //that.toggleAnnotations(null, !self.options.showAnnotations); }; + /*@ + toggleControls toggle controls + () -> toggle visibility of controls + @*/ that.toggleControls = function() { self.$panel.toggle(1); //that.toggleControls(null, !self.options.showControls); diff --git a/source/Ox.UI/js/Video/Ox.VideoPlayer.js b/source/Ox.UI/js/Video/Ox.VideoPlayer.js index 3fd1cc78..b4a8053b 100644 --- a/source/Ox.UI/js/Video/Ox.VideoPlayer.js +++ b/source/Ox.UI/js/Video/Ox.VideoPlayer.js @@ -2091,16 +2091,28 @@ Ox.VideoPlayer = function(options, self) { } }; + /*@ + playInToOut play in to out + () -> play in to out + @*/ that.playInToOut = function() { playInToOut(); return that; }; + /*@ + togglePaused toggle paused state + () -> toggle paused state + @*/ that.togglePaused = function() { togglePaused(); return that; } + /*@ + toggleMuted toggle muted state + () -> toggle muted state + @*/ that.toggleMuted = function() { toggleMuted(); return that;