MCPcopy Index your code
hub / github.com/stemdeckapp/stemdeck / prevTrack

Function prevTrack

static/mobile/app.js:286–291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

284}
285
286function prevTrack() {
287 if (!state.tracks.length || !state.current) return;
288 const idx = state.tracks.findIndex((t) => t.id === state.current.id);
289 const target = state.tracks[idx - 1];
290 if (target) openTrack(target, { autoplay: state.playing });
291}
292
293function nextTrack() {
294 if (!state.tracks.length || !state.current) return;

Callers 1

app.jsFile · 0.85

Calls 1

openTrackFunction · 0.85

Tested by

no test coverage detected