Skip to content

Commit

Permalink
fix: destroy mjpg camera stream properly (#868)
Browse files Browse the repository at this point in the history
Signed-off-by: Mathis Mensing <[email protected]>
  • Loading branch information
matmen authored Sep 18, 2022
1 parent d8dafc8 commit d6cb6f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/widgets/camera/CameraItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default class CameraItem extends Vue {
readonly fullscreen!: boolean
@Ref('camera_image')
readonly cameraImage!: HTMLElement
readonly cameraImage!: HTMLImageElement
// Adaptive load counters
request_start_time = performance.now()
Expand Down Expand Up @@ -149,7 +149,7 @@ export default class CameraItem extends Vue {
*/
beforeDestroy () {
this.cancelCameraTransform()
this.cameraUrl = ''
this.cameraUrl = this.cameraImage.src = ''
this.cameraFullScreenUrl = ''
document.removeEventListener('visibilitychange', this.setUrl)
}
Expand Down

0 comments on commit d6cb6f1

Please sign in to comment.