Class
PlaybackPositionRepository over the playback_position table, for one learner: one row per lesson, replaced on every save.
PlaybackPositionRepository
playback_position
const positions = new TursoPlaybackPositionRepository(database, session.user.id);await positions.setPosition(lessonId, 93.4); Copy
const positions = new TursoPlaybackPositionRepository(database, session.user.id);await positions.setPosition(lessonId, 93.4);
Returns the saved position in seconds, or null when none is persisted.
null
Persists the position in seconds; idempotent.
PlaybackPositionRepositoryover theplayback_positiontable, for one learner: one row per lesson, replaced on every save.Example