MCPcopy Create free account
hub / github.com/error311/FileRise / attachVolumePersistence

Function attachVolumePersistence

public/js/filePreview.js:98–112  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

96}
97
98function attachVolumePersistence(el) {
99 if (!el) return;
100 try {
101 el.addEventListener('volumechange', () => {
102 try {
103 localStorage.setItem(MEDIA_VOLUME_KEY, String(el.volume));
104 localStorage.setItem(MEDIA_MUTED_KEY, el.muted ? '1' : '0');
105 } catch (e) {
106 // ignore storage errors
107 }
108 });
109 } catch (e) {
110 // ignore
111 }
112}
113
114/* -------------------------------- Share modal (existing) -------------------------------- */
115export function openShareModal(file, folder) {

Callers 1

previewFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected