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
parent 9ac49b6fcf
commit 4c6a6333b2
4 changed files with 19 additions and 10 deletions

View file

@ -73,7 +73,7 @@ Ox.IconItem = function(options, self) {
that.$icon = $('<div>')
.addClass('OxIcon')
.css({
top: self.options._isInfoList
top: self.options.________isInfoList
? 0 : self.options.iconWidth == 64 ? -64 : -124,
width: (self.options.iconWidth + 4) + 'px',
height: (self.options.iconHeight + 4) + 'px'
@ -95,7 +95,7 @@ Ox.IconItem = function(options, self) {
that.$textBox = $('<div>')
.addClass('OxText')
.css({
top: self.options._isInfoList
top: self.options.________isInfoList
? self.options.iconHeight
: self.options.iconHeight - self.options.itemWidth / 2 + 'px',
width: self.options.itemWidth + 4 + 'px',

View file

@ -172,6 +172,10 @@ Ox.InfoList = function(options, self) {
return that;
};
that.infoOptions = function(id, options) {
// ...
}
that.paste = function(data) {
that.$element.paste(data);
return that;
@ -201,10 +205,6 @@ Ox.InfoList = function(options, self) {
return that;
};
that.updateInfo = function(id, options) {
// ...
}
that.value = function(id, key, value) {
// fixme: make this accept id, {k: v, ...}
if (arguments.length == 1) {

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({

View file

@ -386,9 +386,9 @@ Lists
.OxThemeModern .OxInfoList .OxItem .OxText > div > .OxInfo {
color: rgb(128, 128, 128);
}
.OxThemeModern .OxInfoList .OxItem.OxSelected .OxIconList .OxIcon > img,
.OxThemeModern .OxInfoList .OxItem.OxSelected .OxIconList .OxIcon .OxVideoPlayer,
.OxThemeModern .OxInfoList .OxItem.OxSelected .OxIconList .OxText > div {
.OxThemeModern .OxInfoList .OxItem.OxSelected .OxInfoElement .OxIcon > img,
.OxThemeModern .OxInfoList .OxItem.OxSelected .OxInfoElement .OxIcon .OxVideoPlayer,
.OxThemeModern .OxInfoList .OxItem.OxSelected .OxInfoElement .OxText > div {
border-color: rgba(0, 0, 0, 0);
background: rgba(0, 0, 0, 0);
-moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0);