更新 infowindow-view.js

remotes/origin/master
钟进 4 years ago
parent 09d4268fea
commit db2da36f9a

@ -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 = $('<video class="video-js CDB-infowindow-media-item" controls data-setup="{}" width="100%"> <source src="" </source></video>');
var $video = $('<video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="100%" height="264" \
var $video = $('<video id="hls-video" class="video-js vjs-default-skin" controls preload="none" width="100%" height="264" \
poster="http://vjs.zencdn.net/v/oceans.png"> \
<source src="http://video.hulian100.cn:9090/live/S105.m3u8" type="application/x-mpegURL"></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 () {

Loading…
Cancel
Save