mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-08 22:53:42 -04:00
Merge pull request #4762 from IgorA100/patch-447707
Now we will pause audioMotion in MonitorStream.js
This commit is contained in:
@@ -416,6 +416,9 @@ function MonitorStream(monitorData) {
|
||||
(e) => {
|
||||
this.writeTextInfoBlock("Paused", {showImg: false});
|
||||
manageEventListener.removeEventListener(this.handlerEventListener['volumechange']);
|
||||
if (typeof pauseAudioMotion === 'function') {
|
||||
pauseAudioMotion(this.id);
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
@@ -2842,6 +2842,13 @@ function destroyAudioMotion(mid) {
|
||||
}
|
||||
};
|
||||
|
||||
function pauseAudioMotion(mid) {
|
||||
const audioMotion = document.querySelector('audio-motion#audioVisualization' + mid);
|
||||
if (audioMotion && audioMotion.pause) {
|
||||
audioMotion.pause();
|
||||
}
|
||||
};
|
||||
|
||||
/*IMPORTANT DO NOT CALL WITHOUT CONSCIOUS NEED!!!*/
|
||||
// https://habr.com/ru/companies/timeweb/articles/667148/
|
||||
async function getTracksFromStream(videoFeedStream) {
|
||||
|
||||
@@ -167,7 +167,6 @@ function streamCmdPause(action) {
|
||||
if (action && monitorStream) {
|
||||
monitorStream.pause();
|
||||
}
|
||||
if (monitorStream.audioMotion && monitorStream.audioMotion.pause) monitorStream.audioMotion.pause();
|
||||
}
|
||||
|
||||
function onPlay() {
|
||||
|
||||
Reference in New Issue
Block a user