Skip to content

Commit c06903e

Browse files
docs: add clip ping endpoint to API reference (#70)
1 parent d57d99f commit c06903e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

docs/api.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ Response: { "count": 5 }
131131
| POST | `/api/clips/[id]/trim` | Trim music clip audio |
132132
| GET | `/api/clips/[id]/waveform` | Get waveform peaks for trim UI |
133133
| POST | `/api/clips/[id]/publish` | Publish music clip (skip trim) |
134+
| POST | `/api/clips/[id]/ping` | Extend trim deadline (heartbeat) |
134135

135136
### POST /api/clips/[id]/watched
136137
```
@@ -206,6 +207,12 @@ Publishes a music clip that is in `pending_trim` status, skipping the trim step.
206207
Response: { "ok": true }
207208
```
208209

210+
### POST /api/clips/[id]/ping
211+
Extends the trim deadline for a music clip in `pending_trim` status. The client sends pings every 10s to keep the trim UI active. When pings stop, the server auto-publishes after the deadline (30s). Only the uploader can ping.
212+
```
213+
Response: { "ok": true }
214+
```
215+
209216
## Group Management
210217

211218
Host-only endpoints (unless noted). Requires `createdBy === currentUser`.

0 commit comments

Comments
 (0)