Add view event bindings for default nostr client

This commit is contained in:
thePR0M3TH3AN committed 2025-10-22 21:48:38 -04:00
1 parent 083750f0f2
commit 6c730704d0
6 files changed
+198 -26

No files matched your search

+4 -4
View File
@@ -22,18 +22,18 @@ import {
countVideoViewEvents,
listVideoViewEvents,
subscribeVideoViewEvents,
} from "./nostr/index.js";
} from "./nostr/viewEventBindings.js";
const VIEW_COUNTER_STORAGE_KEY = "bitvid:view-counter:v1";
const STORAGE_DEBOUNCE_MS = 500;
const SECONDS_PER_DAY = 86_400;
const listVideoViewEventsApi = (pointer, options) =>
listVideoViewEvents(nostrClient, pointer, options);
listVideoViewEvents(pointer, options);
const subscribeVideoViewEventsApi = (pointer, options) =>
subscribeVideoViewEvents(nostrClient, pointer, options);
subscribeVideoViewEvents(pointer, options);
const countVideoViewEventsApi = (pointer, options) =>
countVideoViewEvents(nostrClient, pointer, options);
countVideoViewEvents(pointer, options);
/** @type {Map<string, ViewCounterState>} */
const pointerStates = new Map();