rewrite Ox.VideoElement
This commit is contained in:
parent
708aff64e4
commit
f938f281f1
2 changed files with 227 additions and 296 deletions
|
|
@ -400,7 +400,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
// and poster doesn't seem to work at all
|
||||
Ox.extend({
|
||||
preload: self.options.preload,
|
||||
src: self.video
|
||||
items: self.video,
|
||||
}, !self.options.paused && !self.options.playInToOut ? {
|
||||
/*autoplay: 'autoplay'*/
|
||||
} : {}/*, self.options.poster ? {
|
||||
|
|
@ -410,7 +410,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
.bindEvent(Ox.extend({
|
||||
ended: ended,
|
||||
loadedmetadata: loadedmetadata,
|
||||
pointschange: pointschange,
|
||||
itemchange: itemchange,
|
||||
seeked: seeked,
|
||||
seeking: seeking,
|
||||
sizechange: sizechange
|
||||
|
|
@ -1780,7 +1780,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
//self.options.position = Ox.limit(self.options.position, self['in'], self.out);
|
||||
//self.$video.currentTime(self.options.position);
|
||||
|
||||
setPosition(self.options.position);
|
||||
!self.isPlaylist && setPosition(self.options.position);
|
||||
self.$video.muted(self.options.muted).volume(self.options.volume);
|
||||
|
||||
if (!self.options.paused) {
|
||||
|
|
@ -1859,13 +1859,9 @@ Ox.VideoPlayer = function(options, self) {
|
|||
}
|
||||
}
|
||||
|
||||
function pointschange() {
|
||||
var points = self.$video.points();
|
||||
self['in'] = points[0];
|
||||
self.out = points[1];
|
||||
self.options.duration = self.out - self['in'];
|
||||
setPosition(self['in']);
|
||||
Ox.Log('Video', 'POINTSCHANGE', self['in'], self.out, self.options.position, self.options.duration)
|
||||
function itemchange(data) {
|
||||
var item = self.$video.options('items')[data.item];
|
||||
Ox.Log('Video', 'ITEMCHANGE', item);
|
||||
}
|
||||
|
||||
function progress() {
|
||||
|
|
@ -2104,7 +2100,9 @@ Ox.VideoPlayer = function(options, self) {
|
|||
}
|
||||
self.loadedMetadata = false;
|
||||
showLoadingIcon();
|
||||
self.$video.src(self.options.video[self.options.resolution]);
|
||||
self.$video.options({
|
||||
items: self.options.video[self.options.resolution]
|
||||
});
|
||||
self.$playButton && self.$playButton.options({disabled: true});
|
||||
that.triggerEvent('resolution', {
|
||||
resolution: self.options.resolution
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue