Bugzilla – Attachment 106775 Details for
Bug 6815
Capture member photo via webcam
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6815: Turn off the webcam when done
Bug-6815-Turn-off-the-webcam-when-done.patch (text/plain), 2.42 KB, created by
Mark Tompsett
on 2020-07-10 19:12:24 UTC
(
hide
)
Description:
Bug 6815: Turn off the webcam when done
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2020-07-10 19:12:24 UTC
Size:
2.42 KB
patch
obsolete
>From edfd273cac05110713d95df6575c617ef3a9ea76 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 10 Jul 2020 19:11:04 +0000 >Subject: [PATCH] Bug 6815: Turn off the webcam when done > >--- > koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/js/pages/patron-webcam.js | 7 +++++++ > 2 files changed, 8 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index a97085f81a..15a3d1c7a5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -14,7 +14,7 @@ > <div> > <div class="patronimage-container"> > [% IF ( patron.image ) %] >- <img src="/cgi-bin/koha/members/patronimage.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="patronimage" alt="[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])" /> >+ <img id="patron_image" src="/cgi-bin/koha/members/patronimage.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="patronimage" alt="[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])" /> > <div class="patronimage-controls"> > <div class="patronimage-control"><a data-borrowernumber="[% patron.borrowernumber | uri %]" class="btn btn-default edit-patronimage" title="Edit patron image" href="#"><i class="fa fa-pencil"></i> Edit</a></div> > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/patron-webcam.js b/koha-tmpl/intranet-tmpl/prog/js/pages/patron-webcam.js >index 25813020ad..b720342240 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/patron-webcam.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/patron-webcam.js >@@ -71,6 +71,13 @@ function initializeCamera( camera_form ){ > contentType: false, > processData: false > }).done(function() { >+ var video = document.getElementById('video'); >+ var stream = video.srcObject || video.src; >+ stream.getTracks().forEach(function(track) { >+ if (track.readyState == 'live' && track.kind === 'video') { >+ track.stop(); >+ } >+ }); > var cancel_button = document.getElementById('cancel_capture'); > cancel_button.click(); > }); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6815
:
22623
|
29613
|
38518
|
91302
|
91303
|
91335
|
99015
|
99016
|
99757
|
106774
|
106775
|
106776
|
106777
|
106782
|
106783
|
106787
|
106788
|
106789
|
106790
|
106791
|
106792
|
106793
|
106794
|
106795
|
106796
|
106797
|
106798
|
106799
|
106800
|
106801
|
106802
|
106803
|
106804
|
106938
|
106939
|
106940
|
131174
|
131554
|
131985
|
131987
|
131988
|
131999
|
132000
|
132001