更新 infowindow-view.js

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

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