video player: don't show loading icon if player has no video

This commit is contained in:
rlx 2013-07-18 13:11:06 +00:00
parent 25930a5d14
commit 36c2314b16

View file

@ -194,7 +194,7 @@ Ox.VideoPlayer = function(options, self) {
},
out: function() {
self.options.paused && setMarkers();
self.$timeline && self.$timeline.options('out', self.options.out);
self.$timeline && self.$timeline.options({out: self.options.out});
},
muted: function() {
self.options.muted = !self.options.muted;
@ -522,8 +522,15 @@ Ox.VideoPlayer = function(options, self) {
*/
self.$loadingIcon = Ox.LoadingIcon({video: true})
.appendTo(self.$videoContainer)
.start();
.hide()
.appendTo(self.$videoContainer);
if (!Ox.isEmpty(
Ox.isObject(self.options.video)
? self.options.video[self.options.resolution]
: self.options.video
)) {
showLoadingIcon();
}
if (self.options.showIcon || self.options.showIconOnLoad) {
self.$playIcon = $('<img>')