video player: don't show loading icon if player has no video
This commit is contained in:
parent
25930a5d14
commit
36c2314b16
1 changed files with 10 additions and 3 deletions
|
@ -194,7 +194,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
},
|
},
|
||||||
out: function() {
|
out: function() {
|
||||||
self.options.paused && setMarkers();
|
self.options.paused && setMarkers();
|
||||||
self.$timeline && self.$timeline.options('out', self.options.out);
|
self.$timeline && self.$timeline.options({out: self.options.out});
|
||||||
},
|
},
|
||||||
muted: function() {
|
muted: function() {
|
||||||
self.options.muted = !self.options.muted;
|
self.options.muted = !self.options.muted;
|
||||||
|
@ -522,8 +522,15 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
self.$loadingIcon = Ox.LoadingIcon({video: true})
|
self.$loadingIcon = Ox.LoadingIcon({video: true})
|
||||||
.appendTo(self.$videoContainer)
|
.hide()
|
||||||
.start();
|
.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) {
|
if (self.options.showIcon || self.options.showIconOnLoad) {
|
||||||
self.$playIcon = $('<img>')
|
self.$playIcon = $('<img>')
|
||||||
|
|
Loading…
Reference in a new issue