From db2da36f9aa7b08ea71eecc70d2d21a203ad15f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E8=BF=9B?= Date: Sat, 13 Jun 2020 16:11:10 +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 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/geo/ui/infowindow-view.js b/src/geo/ui/infowindow-view.js index e9bfde4..f54f28b 100644 --- a/src/geo/ui/infowindow-view.js +++ b/src/geo/ui/infowindow-view.js @@ -9,6 +9,8 @@ var util = require('../../core/util'); var ESC_KEY = 27; +var player; + /** * Usage: * var infowindow = new Infowindow({ @@ -177,7 +179,7 @@ var Infowindow = View.extend({ // var $video = $(''); - var $video = $(''); @@ -200,8 +202,14 @@ var Infowindow = View.extend({ this._stopCoverLoader(); + + player = videojs('hls-video'); + + player.play(); + return; +/* var $cover = this.$('.js-cover'); var $img = this.$('.CDB-infowindow-media-item'); var url = $img.attr('src'); @@ -223,6 +231,7 @@ var Infowindow = View.extend({ if (numFields < 3 && imageDimensions.height >= this.$el.height()) { this._loadImageHook(imageDimensions, coverDimensions, url); } + */ }, // end video @@ -623,6 +632,9 @@ var Infowindow = View.extend({ if (this.model.get('visibility')) { this.model.set('visibility', false); } + + if (player) player.dispose(); + }, /** @@ -652,6 +664,8 @@ var Infowindow = View.extend({ hide: function (force) { $(document).off('keyup', this._onKeyUp); if (force || !this.model.get('visibility')) this._animateOut(); + + if (palyer) player.pause(); }, _updateAndAdjustPan: function () {