Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
e498ad52
Commit
e498ad52
authored
Sep 10, 2013
by
David Ormsbee
Committed by
Diana Huang
Sep 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add hasCamera() method to flash camera detection
parent
53d376b6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletions
+8
-1
lms/static/js/verify_student/CameraCapture.as
+5
-0
lms/static/js/verify_student/CameraCapture.swf
+0
-0
lms/static/js/verify_student/photocapture.js
+3
-1
No files found.
lms/static/js/verify_student/CameraCapture.as
View file @
e498ad52
...
...
@@ -58,6 +58,7 @@ package
ExternalInterface
.
addCallback
(
"reset"
,
reset
)
;
ExternalInterface
.
addCallback
(
"imageDataUrl"
,
imageDataUrl
)
;
ExternalInterface
.
addCallback
(
"cameraAuthorized"
,
cameraAuthorized
)
;
ExternalInterface
.
addCallback
(
"hasCamera"
,
hasCamera
)
;
// Notify the container that the SWF is ready to be called.
ExternalInterface
.
call
(
"setSWFIsReady"
)
;
...
...
@@ -108,6 +109,10 @@ package
return
permissionGiven
;
}
public
function
hasCamera
()
:
Boolean
{
return
(
Camera
.
names
.
length
!=
0
)
;
}
public
function
statusHandler
(
event
:
StatusEvent
)
:
void
{
switch
(
event
.
code
)
{
...
...
lms/static/js/verify_student/CameraCapture.swf
View file @
e498ad52
No preview for this file type
lms/static/js/verify_student/photocapture.js
View file @
e498ad52
...
...
@@ -189,9 +189,11 @@ function initSnapshotHandler(names, hasHtml5CameraSupport) {
}
function
objectTagForFlashCamera
(
name
)
{
// I manually update this to have ?v={2,3,4, etc} to avoid caching of flash
// objects on local dev.
return
'<object type="application/x-shockwave-flash" id="'
+
name
+
'" name="'
+
name
+
'" data='
+
'"/static/js/verify_student/CameraCapture.swf?v=
2
"'
+
'"/static/js/verify_student/CameraCapture.swf?v=
3
"'
+
'width="500" height="375"><param name="quality" '
+
'value="high"><param name="allowscriptaccess" '
+
'value="sameDomain"></object>'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment