Clean up HLS stream
Without this, it will continue loading chunks in the background.
This commit is contained in:
parent
572a8c6d3c
commit
acad9c5944
2 changed files with 10 additions and 6 deletions
15
main.js
15
main.js
|
|
@ -23,12 +23,6 @@ const popupOverlay = new Overlay({
|
|||
},
|
||||
});
|
||||
|
||||
closer.onclick = function () {
|
||||
popupOverlay.setPosition(undefined);
|
||||
closer.blur();
|
||||
return false;
|
||||
};
|
||||
|
||||
const contextMenu = new ContextMenu({
|
||||
width: 170,
|
||||
defaultItems: false,
|
||||
|
|
@ -147,6 +141,15 @@ map.on('click', function (evt) {
|
|||
}
|
||||
|
||||
popupOverlay.setPosition(evt.coordinate);
|
||||
|
||||
closer.onclick = function (){
|
||||
popupOverlay.setPosition(undefined);
|
||||
if (layer.hasOwnProperty('destroyPopupCallback')) {
|
||||
layer.destroyPopupCallback(feature);
|
||||
}
|
||||
closer.blur();
|
||||
return false;
|
||||
};
|
||||
});
|
||||
|
||||
new ResizeObserver(() => map.updateSize()).observe(document.getElementById("map"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue