更新 infowindow-view.js

remotes/origin/master
钟进 4 years ago
parent 9d6a6fab1a
commit b6ea2ff298

@ -154,28 +154,28 @@ var Infowindow = View.extend({
//this._startCoverLoader(); //this._startCoverLoader();
var url = this._getCoverURL(); var url = this._getCoverURL();
var $urlsrc = this.$('#target');
$urlsrc.attr('src', url);
/* // var $urlsrc = this.$('#target');
if (this._isLoadingFields()) { // $urlsrc.attr('src', url);
return;
}
if (!this._isValidVideoURL(url)) {
this._stopCoverLoader();
this._showInfowindowVideoError();
return;
}
if (this._containsTemplateCover()) { if(Hls.isSupported()) {
this._loadCoverFromTemplate(url); var video = document.getElementById('hls-video');
} else { var hls = new Hls({
this._loadVideoFromUrl(url); debug: true
});
hls.loadSource(url);
hls.attachMedia(video);
hls.on(Hls.Events.MEDIA_ATTACHED, function() {
video.muted = true;
video.play();
});
}
else if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = url;
video.addEventListener('canplay',function() {
video.play();
});
} }
*/
var $urlsrc = this.$('#target');
$urlsrc.attr('src', url);
}, },

Loading…
Cancel
Save