diff --git a/lms/static/js/verify_student/views/webcam_photo_view.js b/lms/static/js/verify_student/views/webcam_photo_view.js index acbf40b7e7..42560a2074 100644 --- a/lms/static/js/verify_student/views/webcam_photo_view.js +++ b/lms/static/js/verify_student/views/webcam_photo_view.js @@ -50,11 +50,14 @@ }, snapshot: function() { - var video; + var video, canvas; if (this.stream) { video = this.getVideo(); - this.getCanvas().getContext('2d').drawImage(video, 0, 0); + canvas = this.getCanvas(); + canvas.width = video.videoWidth; + canvas.height = video.videoHeight; + canvas.getContext('2d').drawImage(video, 0, 0); video.pause(); return true; } @@ -151,20 +154,6 @@ return this.imageData; }, - flashObjectTag: function() { - return ( - '' + - '' + - '' + - '' - ); - }, - getFlashObject: function() { return $('#flash_video')[0]; }, @@ -242,10 +231,10 @@ this.setSubmitButtonEnabled(false); // Load the template for the webcam into the DOM - renderedHtml = _.template($(this.template).html())( + renderedHtml = edx.HtmlUtils.template($(this.template).html())( {backendName: this.backend.name} ); - $(this.el).html(renderedHtml); + edx.HtmlUtils.setHtml($(this.el), renderedHtml); $resetBtn = this.$el.find('#webcam_reset_button'); $captureBtn = this.$el.find('#webcam_capture_button');