1
0
Fork 0
forked from 0x2620/oxjs

make 'censored' icon/link/tooltip configurable (fixes #252)

This commit is contained in:
rlx 2012-04-22 09:57:17 +00:00
commit f0d4043fd4
6 changed files with 89 additions and 42 deletions

View file

@ -8,6 +8,8 @@ Ox.VideoTimelinePlayer = function(options, self) {
var that = Ox.Element({}, self)
.defaults({
censored: [],
censoredIcon: '',
censoredTooltip: '',
cuts: [],
duration: 0,
find: '',
@ -279,6 +281,8 @@ Ox.VideoTimelinePlayer = function(options, self) {
self.$frame = Ox.VideoPlayer({
censored: self.options.censored,
censoredIcon: self.options.censoredIcon,
censoredTooltip: self.options.censoredTooltip,
duration: self.options.duration,
height: self.tileHeight,
position: self.options.position,
@ -287,6 +291,11 @@ Ox.VideoTimelinePlayer = function(options, self) {
video: self.options.getFrameURL,
width: self.videoWidth
})
.bindEvent({
censored: function() {
that.triggerEvent('censored');
}
})
.appendTo(self.$frameBox);
$('<div>')
@ -316,6 +325,8 @@ Ox.VideoTimelinePlayer = function(options, self) {
self.$video = Ox.VideoPlayer({
censored: self.options.censored,
censoredIcon: self.options.censoredIcon,
censoredTooltip: self.options.censoredTooltip,
duration: self.options.duration,
height: self.tileHeight,
muted: self.options.muted,
@ -326,6 +337,9 @@ Ox.VideoTimelinePlayer = function(options, self) {
width: self.videoWidth
})
.bindEvent({
censored: function() {
that.triggerEvent('censored');
},
ended: function() {
togglePaused(true);
},