cleanup VideoElement
This commit is contained in:
parent
b487da90a1
commit
03cbb92654
2 changed files with 7 additions and 16 deletions
|
@ -5,7 +5,7 @@ Ox.VideoElement <f> VideoElement Object
|
||||||
options <o> Options object
|
options <o> Options object
|
||||||
autoplay <b|false> autoplay
|
autoplay <b|false> autoplay
|
||||||
items <a|[]> array of objects with src,in,out,duration
|
items <a|[]> array of objects with src,in,out,duration
|
||||||
look <b|false> loop playback
|
loop <b|false> loop playback
|
||||||
self <o> Shared private variable
|
self <o> Shared private variable
|
||||||
([options[, self]]) -> <o:Ox.Element> VideoElement Object
|
([options[, self]]) -> <o:Ox.Element> VideoElement Object
|
||||||
loadedmetadata <!> loadedmetadata
|
loadedmetadata <!> loadedmetadata
|
||||||
|
@ -109,7 +109,9 @@ Ox.VideoElement = function(options, self) {
|
||||||
|
|
||||||
loadItems(function() {
|
loadItems(function() {
|
||||||
setCurrentItem(0);
|
setCurrentItem(0);
|
||||||
self.options.autoplay && that.play();
|
self.options.autoplay && setTimeout(function() {
|
||||||
|
that.play();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function getCurrentTime() {
|
function getCurrentTime() {
|
||||||
|
|
|
@ -49,7 +49,6 @@ Ox.VideoPlayer <f> Generic Video Player
|
||||||
position <n|0> Initial position (sec)
|
position <n|0> Initial position (sec)
|
||||||
poster <s|''> Poster URL
|
poster <s|''> Poster URL
|
||||||
posterFrame <n|-1> Position of poster frame (sec)
|
posterFrame <n|-1> Position of poster frame (sec)
|
||||||
preload <s|'auto'> 'auto', 'metadata' or 'none'
|
|
||||||
out <n> Out point (sec)
|
out <n> Out point (sec)
|
||||||
resolution <n|0> resolution
|
resolution <n|0> resolution
|
||||||
rewind <b|false> If true, video will rewind when ended
|
rewind <b|false> If true, video will rewind when ended
|
||||||
|
@ -146,7 +145,6 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
position: 0,
|
position: 0,
|
||||||
poster: '',
|
poster: '',
|
||||||
posterFrame: -1,
|
posterFrame: -1,
|
||||||
preload: 'auto',
|
|
||||||
out: 0,
|
out: 0,
|
||||||
resolution: 0,
|
resolution: 0,
|
||||||
rewind: false,
|
rewind: false,
|
||||||
|
@ -416,18 +414,9 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
dragend: dragend
|
dragend: dragend
|
||||||
});
|
});
|
||||||
|
|
||||||
self.$video = Ox.VideoElement(
|
self.$video = Ox.VideoElement({
|
||||||
// autoplay seems to always play from the beginning,
|
items: self.video
|
||||||
// and poster doesn't seem to work at all
|
})
|
||||||
Ox.extend({
|
|
||||||
preload: self.options.preload,
|
|
||||||
items: self.video,
|
|
||||||
}, !self.options.paused && !self.options.playInToOut ? {
|
|
||||||
/*autoplay: 'autoplay'*/
|
|
||||||
} : {}/*, self.options.poster ? {
|
|
||||||
poster: self.options.poster
|
|
||||||
} : {}*/)
|
|
||||||
)
|
|
||||||
.bindEvent(Ox.extend({
|
.bindEvent(Ox.extend({
|
||||||
durationchange: durationchange,
|
durationchange: durationchange,
|
||||||
ended: ended,
|
ended: ended,
|
||||||
|
|
Loading…
Reference in a new issue