From 365100b613be6b9d650abff3d25380033e258c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E8=BF=9B?= Date: Sat, 13 Jun 2020 15:08:27 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20infowindow-view.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/geo/ui/infowindow-view.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/geo/ui/infowindow-view.js b/src/geo/ui/infowindow-view.js index 206b119..b6d7c9e 100644 --- a/src/geo/ui/infowindow-view.js +++ b/src/geo/ui/infowindow-view.js @@ -184,8 +184,7 @@ var Infowindow = View.extend({ $cover.append($video); $video -// .load(this._onLoadVideoSuccess) - .load(this._stopCoverLoader) + .load(this._onLoadVideoSuccess) .error(this._onLoadVideoError) // .attr('src', url); }, @@ -196,6 +195,11 @@ var Infowindow = View.extend({ }, _onLoadVideoSuccess: function () { + + this._stopCoverLoader(); + + return; + var $cover = this.$('.js-cover'); var $img = this.$('.CDB-infowindow-media-item'); var url = $img.attr('src'); @@ -222,7 +226,7 @@ var Infowindow = View.extend({ // end video _initBinds: function () { - _.bindAll(this, '_onKeyUp', '_onLoadImageSuccess', '_onLoadImageError'); + _.bindAll(this, '_onKeyUp', '_onLoadImageSuccess', '_onLoadImageError', '_onLoadVideoSuccess', '_onLoadVideoError'); this.listenTo(this.model, 'change:content change:alternative_names change:width change:maxHeight', this.render, this); this.listenTo(this.model, 'change:latlng', this._updateAndAdjustPan, this);