mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 04:01:20 -08:00
add volume
This commit is contained in:
1 parent
dfd71c06b6
commit
c69c3a42ed
14 files changed
+157
-38
No files matched your search
@@ -79,3 +79,15 @@ export function deepMerge(...sources) {
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
export function getStorage(key) {
|
||||
const storage = JSON.parse(localStorage.getItem('artplayer_settings')) || {};
|
||||
return key ? storage[key] : storage;
|
||||
}
|
||||
|
||||
export function setStorage(key, value) {
|
||||
const storage = Object.assign({}, getStorage(), {
|
||||
[key]: value
|
||||
});
|
||||
localStorage.setItem('artplayer_settings', JSON.stringify(storage));
|
||||
}
|
||||
Reference in new issue
Block a user