Commit f31746e7 by Awais

ECOM-1471 Hiding the text.

parent ede1c70e
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
this.stream = stream; this.stream = stream;
video.src = this.URL.createObjectURL( stream ); video.src = this.URL.createObjectURL( stream );
video.play(); video.play();
this.trigger('webcam-loaded');
}, },
getVideo: function() { getVideo: function() {
...@@ -220,6 +221,7 @@ ...@@ -220,6 +221,7 @@
_.extend( this.backend, Backbone.Events ); _.extend( this.backend, Backbone.Events );
this.listenTo( this.backend, 'error', this.handleError ); this.listenTo( this.backend, 'error', this.handleError );
this.listenTo( this.backend, 'webcam-loaded', this.handleWebcamLoaded );
}, },
isSupported: function() { isSupported: function() {
...@@ -285,6 +287,11 @@ ...@@ -285,6 +287,11 @@
} }
}, },
handleWebcamLoaded: function( errorTitle, errorMsg ) {
// Hide the text behind camera
$( "#camera .placeholder-art", this.el ).hide();
},
handleError: function( errorTitle, errorMsg ) { handleError: function( errorTitle, errorMsg ) {
// Hide the buttons // Hide the buttons
$( "#webcam_capture_button", this.el ).addClass('is-hidden'); $( "#webcam_capture_button", this.el ).addClass('is-hidden');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment