mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-08 10:22:31 -04:00
Use actual video aspect ratio for '#monitor-thumb-overlay' container (video-stream.js)
This commit is contained in:
1 parent
e8a2859dbf
commit
d322dbabdf
1 file changed
+9
@@ -48,12 +48,21 @@ class VideoStream extends VideoRTC {
|
||||
|
||||
onplay() {
|
||||
const liveStream = this.closest('[id ^= "liveStream"]');
|
||||
const container = document.getElementById('monitor-thumb-overlay');
|
||||
if (liveStream) {
|
||||
const monitorStream = getMonitorStream(stringToNumber(liveStream.id));
|
||||
if (monitorStream) {
|
||||
monitorStream.streamStartTime = (Date.now() / 1000).toFixed(2);
|
||||
}
|
||||
}
|
||||
|
||||
if (container) {
|
||||
const dimensions = calculateOverlayDimensions(this.video);
|
||||
if (dimensions) {
|
||||
container.style.width = dimensions.width+'px';
|
||||
container.style.height = dimensions.height+'px';
|
||||
}
|
||||
}
|
||||
super.onplay();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user