1
0
Fork 0
forked from 0x2620/oxjs

some changes to enable clips view in pandora; fix video player to allow for paused=false and playInToOut=true

This commit is contained in:
rlx 2011-10-19 10:49:19 +00:00
commit 4c6a6333b2
4 changed files with 19 additions and 10 deletions

View file

@ -278,10 +278,12 @@ Ox.VideoPlayer = function(options, self) {
});
self.$video = Ox.VideoElement(
// autoplay seems to always play from the beginning,
// and poster doesn't seem to work at all
Ox.extend({
preload: self.options.preload,
src: self.video
}, !self.options.paused ? {
}, !self.options.paused && !self.options.playInToOut ? {
autoplay: 'autoplay'
} : {}/*, self.options.poster ? {
poster: self.options.poster
@ -1491,6 +1493,13 @@ Ox.VideoPlayer = function(options, self) {
//self.options.position = Ox.limit(self.options.position, self['in'], self.out);
self.$video.currentTime(self.options.position);
// if not paused, but playInToOut, we haven't set autoplay before,
// since autoplay seems to always play from the beginning
if (!self.options.paused && self.options.playInToOut) {
self.options.paused = true;
togglePaused('button');
}
self.options.paused && self.options.showMarkers && setMarkers();
self.options.paused && self.playOnLoad && togglePaused('button');
self.$playButton && self.$playButton.options({