"audio only" checkbox is now remembered after page loads

removed videogular icons as it caused compilation errors
This commit is contained in:
Isaac Grynsztein
2020-02-19 02:45:05 -05:00
parent 9b1e84821e
commit 8545016f1d
2 changed files with 7 additions and 4 deletions

View File

@@ -24,8 +24,7 @@
"src/backend"
],
"styles": [
"src/styles.css",
"../node_modules/videogular2/fonts/videogular.css"
"src/styles.css"
],
"scripts": []
},
@@ -75,8 +74,7 @@
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [
"src/styles.css",
"../node_modules/videogular2/fonts/videogular.css"
"src/styles.css"
],
"assets": [
"src/assets",

View File

@@ -301,6 +301,10 @@ export class MainComponent implements OnInit {
// app initialization.
ngOnInit() {
this.iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window['MSStream'];
if (localStorage.getItem('audioOnly') !== null) {
this.audioOnly = localStorage.getItem('audioOnly') === 'true';
}
}
// download helpers
@@ -553,6 +557,7 @@ export class MainComponent implements OnInit {
videoModeChanged(new_val) {
this.selectedQuality = '';
localStorage.setItem('audioOnly', new_val.checked.toString());
}
getAudioAndVideoFormats(formats): any[] {