Bugzilla – Attachment 106940 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: Attempt again to make it work in sandbox
Bug-6815-Attempt-again-to-make-it-work-in-sandbox.patch (text/plain), 3.42 KB, created by
Mark Tompsett
on 2020-07-15 20:52:46 UTC
(
hide
)
Description:
Bug 6815: Attempt again to make it work in sandbox
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2020-07-15 20:52:46 UTC
Size:
3.42 KB
patch
obsolete
>From 0e57610353973dd5b4bef2419497979a7501c2fd Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Wed, 15 Jul 2020 20:52:02 +0000 >Subject: [PATCH] Bug 6815: Attempt again to make it work in sandbox > >--- > .../en/modules/members/moremember-patronimage.tt | 34 ++++++++++++---------- > 1 file changed, 18 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-patronimage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-patronimage.tt >index 9733e6140f..931098e1aa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-patronimage.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-patronimage.tt >@@ -53,8 +53,9 @@ > > <script> > function turn_on() { >- if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { >- navigator.mediaDevices.getUserMedia({video: true}).then( >+ var nav = window.navigator; >+ if (nav.mediaDevices && nav.mediaDevices.getUserMedia) { >+ nav.mediaDevices.getUserMedia({video: true}).then( > function(stream) { > video.srcObject = stream; > video.play(); >@@ -74,13 +75,13 @@ > ); > } else { > // Detect camera >- navigator.getMedia = ( navigator.getUserMedia || >- navigator.webkitGetUserMedia || >- navigator.mozGetUserMedia || >- navigator.msGetUserMedia ); >- if (navigator.getMedia) { >+ nav.getMedia = ( nav.getUserMedia || >+ nav.webkitGetUserMedia || >+ nav.mozGetUserMedia || >+ nav.msGetUserMedia ); >+ if (nav.getMedia) { > // keep it on, and set object sizes >- navigator.getMedia( >+ nav.getMedia( > {video: true}, > function(stream) { > var takebutton = document.getElementById('webcam_capture'); >@@ -174,6 +175,7 @@ > } > </script> > <script> >+ var nav = window.navigator; > var video = document.getElementById('videoFeed'); > var canvas = document.getElementById('canvas'); > var picture = document.getElementById('picture'); >@@ -181,8 +183,8 @@ > var savepicture = document.getElementById('webcam_save'); > savepicture.disabled = true; > >- if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { >- navigator.mediaDevices.getUserMedia({video: true}).then( >+ if (nav.mediaDevices && nav.mediaDevices.getUserMedia) { >+ nav.mediaDevices.getUserMedia({video: true}).then( > function(stream) { > video.srcObject = stream; > video.play(); >@@ -202,14 +204,14 @@ > ); > } else { > // Detect camera >- navigator.getMedia = ( navigator.getUserMedia || >- navigator.webkitGetUserMedia || >- navigator.mozGetUserMedia || >- navigator.msGetUserMedia ); >+ nav.getMedia = ( nav.getUserMedia || >+ nav.webkitGetUserMedia || >+ nav.mozGetUserMedia || >+ nav.msGetUserMedia ); > // If camera... >- if (navigator.getMedia) { >+ if (nav.getMedia) { > // keep it on and set objects height and width >- navigator.getMedia( >+ nav.getMedia( > {video: true}, > function(stream) { > video.srcObject = stream; >-- >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