timeline view: make in and out players display an image, not a video
This commit is contained in:
parent
50b92ebad5
commit
e8e8be5b6d
1 changed files with 49 additions and 31 deletions
|
@ -9482,6 +9482,7 @@ requires
|
||||||
cuts: [],
|
cuts: [],
|
||||||
duration: 0,
|
duration: 0,
|
||||||
find: '',
|
find: '',
|
||||||
|
frameURL: function() {},
|
||||||
largeTimeline: true,
|
largeTimeline: true,
|
||||||
matches: [],
|
matches: [],
|
||||||
points: [0, 0],
|
points: [0, 0],
|
||||||
|
@ -9518,7 +9519,7 @@ requires
|
||||||
posterFrame: self.options.posterFrame,
|
posterFrame: self.options.posterFrame,
|
||||||
subtitles: self.options.subtitles,
|
subtitles: self.options.subtitles,
|
||||||
type: type,
|
type: type,
|
||||||
url: self.options.videoURL,
|
url: type == 'play' ? self.options.videoURL : self.options.frameURL,
|
||||||
width: self.sizes.player[i].width
|
width: self.sizes.player[i].width
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
|
@ -9917,24 +9918,26 @@ requires
|
||||||
|
|
||||||
self.controlsHeight = 16;
|
self.controlsHeight = 16;
|
||||||
|
|
||||||
self.$video = $('<video>')
|
if (self.options.type == 'play') {
|
||||||
.attr({
|
self.$video = $('<video>')
|
||||||
preload: 'auto'
|
.attr({
|
||||||
})
|
preload: 'auto',
|
||||||
.css({
|
src: self.options.url
|
||||||
height: self.options.height + 'px',
|
})
|
||||||
width: self.options.width + 'px'
|
.css({
|
||||||
})
|
height: self.options.height + 'px',
|
||||||
.appendTo(that.$element);
|
width: self.options.width + 'px'
|
||||||
|
})
|
||||||
self.video = self.$video[0];
|
.appendTo(that.$element);
|
||||||
|
self.video = self.$video[0];
|
||||||
// fixme: can be removed once in and out players only display stills
|
} else {
|
||||||
var other = $('video[src='+self.options.url+']')[0];
|
self.$video = $('<img>')
|
||||||
if (self.video.mozLoadFrom && other)
|
.css({
|
||||||
self.video.mozLoadFrom(other);
|
height: self.options.height + 'px',
|
||||||
else
|
width: self.options.width + 'px'
|
||||||
self.video.src = self.options.url;
|
})
|
||||||
|
.appendTo(that.$element)
|
||||||
|
}
|
||||||
|
|
||||||
self.$subtitle = $('<div>')
|
self.$subtitle = $('<div>')
|
||||||
.addClass('OxSubtitle')
|
.addClass('OxSubtitle')
|
||||||
|
@ -10089,17 +10092,20 @@ requires
|
||||||
}).addClass('foo');
|
}).addClass('foo');
|
||||||
});
|
});
|
||||||
|
|
||||||
self.$loadingIcon = new Ox.LoadingIcon()
|
if (self.options.type == 'play') {
|
||||||
.appendTo(that)
|
self.$loadingIcon = new Ox.LoadingIcon()
|
||||||
.start();
|
.appendTo(that)
|
||||||
|
.start();
|
||||||
self.loadInterval = setInterval(function() {
|
self.loadingInterval = setInterval(function() {
|
||||||
if (self.video.readyState) {
|
if (self.video.readyState) {
|
||||||
clearInterval(self.loadInterval);
|
clearInterval(self.loadingInterval);
|
||||||
self.$loadingIcon.stop();
|
self.$loadingIcon.stop();
|
||||||
setPosition();
|
setPosition();
|
||||||
}
|
}
|
||||||
}, 50);
|
}, 50);
|
||||||
|
} else {
|
||||||
|
setPosition();
|
||||||
|
}
|
||||||
|
|
||||||
function getSubtitle() {
|
function getSubtitle() {
|
||||||
var subtitle = '';
|
var subtitle = '';
|
||||||
|
@ -10166,7 +10172,19 @@ requires
|
||||||
}
|
}
|
||||||
|
|
||||||
function setPosition() {
|
function setPosition() {
|
||||||
self.video.currentTime = self.options.position;
|
if (self.options.type == 'play') {
|
||||||
|
self.video.currentTime = self.options.position;
|
||||||
|
} else {
|
||||||
|
self.$loadingIcon = new Ox.LoadingIcon()
|
||||||
|
.appendTo(that)
|
||||||
|
.start();
|
||||||
|
self.$video.attr({
|
||||||
|
src: self.options.url(self.options.position)
|
||||||
|
})
|
||||||
|
.one('load', function() {
|
||||||
|
self.$loadingIcon.stop();
|
||||||
|
});
|
||||||
|
}
|
||||||
setMarkers();
|
setMarkers();
|
||||||
setSubtitle();
|
setSubtitle();
|
||||||
self.$positionInput.options({
|
self.$positionInput.options({
|
||||||
|
|
Loading…
Reference in a new issue