forked from Mirrors/freeswitch
FS-8095 [verto_communicator] added reset button to default settings.
This commit is contained in:
parent
7b914ee69c
commit
bc4d21e382
@ -24,6 +24,7 @@
|
||||
</select>
|
||||
|
||||
<a class="btn btn-primary" href="" ng-click="refreshDeviceList()">Refresh device list</a>
|
||||
<a class="btn btn-primary" href="" ng-click="resetSettings()">Factory reset</a>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
@ -4,39 +4,40 @@
|
||||
.module('storageService')
|
||||
.service('storage', ['$rootScope', '$localStorage',
|
||||
function($rootScope, $localStorage) {
|
||||
var data = $localStorage;
|
||||
var data = $localStorage,
|
||||
defaultSettings = {
|
||||
ui_connected: false,
|
||||
ws_connected: false,
|
||||
cur_call: 0,
|
||||
called_number: '',
|
||||
useVideo: true,
|
||||
call_history: {},
|
||||
history_control: [],
|
||||
call_start: false,
|
||||
name: '',
|
||||
email: '',
|
||||
login: '',
|
||||
password: '',
|
||||
userStatus: 'disconnected',
|
||||
mutedVideo: false,
|
||||
mutedMic: false,
|
||||
selectedVideo: null,
|
||||
selectedAudio: null,
|
||||
selectedShare: null,
|
||||
useStereo: true,
|
||||
useSTUN: true,
|
||||
useDedenc: false,
|
||||
mirrorInput: false,
|
||||
outgoingBandwidth: 'default',
|
||||
incomingBandwidth: 'default',
|
||||
vidQual: undefined,
|
||||
askRecoverCall: false,
|
||||
googNoiseSuppression: true,
|
||||
googHighpassFilter: true,
|
||||
googEchoCancellation: true
|
||||
};
|
||||
|
||||
data.$default({
|
||||
ui_connected: false,
|
||||
ws_connected: false,
|
||||
cur_call: 0,
|
||||
called_number: '',
|
||||
useVideo: true,
|
||||
call_history: {},
|
||||
history_control: [],
|
||||
call_start: false,
|
||||
name: '',
|
||||
email: '',
|
||||
login: '',
|
||||
password: '',
|
||||
userStatus: 'disconnected',
|
||||
mutedVideo: false,
|
||||
mutedMic: false,
|
||||
selectedVideo: null,
|
||||
selectedAudio: null,
|
||||
selectedShare: null,
|
||||
useStereo: true,
|
||||
useSTUN: true,
|
||||
useDedenc: false,
|
||||
mirrorInput: false,
|
||||
outgoingBandwidth: 'default',
|
||||
incomingBandwidth: 'default',
|
||||
vidQual: undefined,
|
||||
askRecoverCall: false,
|
||||
googNoiseSuppression: true,
|
||||
googHighpassFilter: true,
|
||||
googEchoCancellation: true
|
||||
});
|
||||
data.$default(defaultSettings);
|
||||
|
||||
function changeData(verto_data) {
|
||||
jQuery.extend(true, data, verto_data);
|
||||
@ -46,10 +47,7 @@
|
||||
data: data,
|
||||
changeData: changeData,
|
||||
reset: function() {
|
||||
data.ui_connected = false;
|
||||
data.ws_connected = false;
|
||||
data.cur_call = 0;
|
||||
data.userStatus = 'disconnected';
|
||||
data.$reset(defaultSettings);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -25,6 +25,10 @@
|
||||
$scope.refreshDeviceList = function() {
|
||||
return verto.refreshDevices();
|
||||
}
|
||||
|
||||
$scope.resetSettings = function() {
|
||||
storage.reset();
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user