|
@@ -1,8 +1,8 @@
|
|
|
$(function() {
|
|
|
var App = {
|
|
|
init : function() {
|
|
|
- if (localStorage.getItem('deviceId') !== null) {
|
|
|
- this.state.inputStream.constraints.deviceId = localStorage.getItem('deviceId');
|
|
|
+ if (sessionStorage.getItem('deviceId') !== null) {
|
|
|
+ this.state.inputStream.constraints.deviceId = sessionStorage.getItem('deviceId');
|
|
|
}
|
|
|
Quagga.init(this.state, function(err) {
|
|
|
if (err) {
|
|
@@ -95,7 +95,7 @@ $(function() {
|
|
|
name = $target.attr("name"),
|
|
|
state = self._convertNameToState(name);
|
|
|
|
|
|
- localStorage.setItem('deviceId', value);
|
|
|
+ sessionStorage.setItem('deviceId', value);
|
|
|
console.log("Value of "+ state + " changed to " + value);
|
|
|
self.setState(state, value);
|
|
|
});
|