wait if video is currently seeking
This commit is contained in:
parent
e763541eea
commit
635a26dc48
1 changed files with 7 additions and 2 deletions
|
@ -227,7 +227,11 @@ Ox.VideoElement = function(options, self) {
|
|||
}
|
||||
|
||||
function onLoadedMetadata($video, callback) {
|
||||
if ($video[0].readyState) {
|
||||
if ($video[0].seeking) {
|
||||
$video.one('seeked', function(event) {
|
||||
callback($video[0]);
|
||||
});
|
||||
} else if ($video[0].readyState) {
|
||||
callback($video[0]);
|
||||
} else {
|
||||
$video.one('loadedmetadata', function(event) {
|
||||
|
@ -254,7 +258,6 @@ Ox.VideoElement = function(options, self) {
|
|||
self.video && self.video.pause();
|
||||
self.currentItem = item;
|
||||
self.currentItemId = self.items[self.currentItem].id;
|
||||
Ox.Log('Video', 'sCV', self.video.src, item['in']);
|
||||
setCurrentVideo(function() {
|
||||
if (!self.loadedMetadata) {
|
||||
self.loadedMetadata = true;
|
||||
|
@ -295,6 +298,8 @@ Ox.VideoElement = function(options, self) {
|
|||
self.video.volume = volume;
|
||||
self.video.muted = muted;
|
||||
self.$video.css(css);
|
||||
Ox.Log('Video', 'sCV', self.video.src, self.items[self.currentItem]['in'],
|
||||
self.video.currentTime, self.video.seeking);
|
||||
onLoadedMetadata(self.$video, function(video) {
|
||||
self.$video.one('seeked', function() {
|
||||
self.loading = false;
|
||||
|
|
Loading…
Reference in a new issue