if play returns pormise, wait for it
This commit is contained in:
parent
4c54a294f6
commit
310502df22
1 changed files with 8 additions and 2 deletions
|
@ -363,8 +363,14 @@ Ox.VideoElement = function(options, self) {
|
|||
Ox.Log('Video', 'sCV set in', video.src, item['in'] || 0, video.currentTime, video.seeking);
|
||||
video.currentTime = item['in'] || 0;
|
||||
if (self.paused) {
|
||||
self.video.play();
|
||||
var promise = self.video.play();
|
||||
if (promise) {
|
||||
promise.then(function() {
|
||||
self.video.pause();
|
||||
});
|
||||
} else {
|
||||
self.video.pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue