177 Commits

Author SHA1 Message Date
Rob Watson
29129afe90 Add test coverage for waveformselectionchanged event
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-07 07:55:47 +01:00
Rob Watson
a0bb48fb69 Add basic test coverage for viewport handling
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-05 09:16:31 +01:00
Rob Watson
a8ba36a0e1 GetAudio: avoid leaking goroutine on cancellation
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-05 07:46:52 +01:00
Rob Watson
54e9bc0d2c Pass context from gRPC streams to background tasks 2022-02-05 07:44:44 +01:00
Rob Watson
6dde29cdcf GetPeaksForSegment: add extra invalid arg check 2022-02-04 16:22:06 +01:00
Rob Watson
a9ea462b41 Rename CanvasLogicalWidth to CanvasWidth
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-04 08:37:39 +01:00
Rob Watson
3dcc1edc62 Replace Selection interface with CanvasRange
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-04 08:35:54 +01:00
Rob Watson
b64f0b4daa Start to add test coverage to AppState
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-04 08:10:33 +01:00
Rob Watson
9f76d2764f Refactor top-level state management => useReducer
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-03 19:56:05 +01:00
Rob Watson
a855d589f3 Refactor HudCanvasState tests 2022-02-03 19:44:28 +01:00
Rob Watson
6ba19b3e01 Bug fix: prevent incorrect selectionChange callbacks
All checks were successful
continuous-integration/drone/push Build is passing
When re-rendering the HudCanvas component, the selectionChange callback
should not be triggered with the passed-in properties. Doing so leads to
incorrect selection values being bubbled up when the selection is not
enclosed in the viewport.

The state management should probably be improved to avoid this dance
completely, possibly by hoisting all of this state up to the top-level.
2022-01-29 12:32:39 +01:00
Rob Watson
bff15098e6 Enable grpc-web CORS origin checking
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-27 20:40:33 +01:00
Rob Watson
cf90100c5f Add CORS headers to HTTP handlers
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-26 19:27:57 +01:00
Rob Watson
698b97e904 Update backend dependencies
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-26 07:32:34 +01:00
Rob Watson
404c11909b Bug fix: update waveform after fetching audio from Youtube
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-25 22:47:26 +01:00
Rob Watson
5a1ebb7c3a Send AudioFrames in gRPC message when available
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-25 20:06:19 +01:00
Rob Watson
48c84a7efa Bug fix: avoid NaN in helper 2022-01-25 20:06:15 +01:00
Rob Watson
5af8f0c319 HudCanvas: extract HudCanvasState
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-24 20:33:16 +01:00
Rob Watson
4f443af8fa HudCanvas: draw hover position
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-18 18:23:00 +01:00
Rob Watson
9ae4335b19 Disable buttons when zooming is not possible 2022-01-18 18:23:00 +01:00
Rob Watson
a4e9ebca3b Update duration display on selection change 2022-01-18 18:23:00 +01:00
Rob Watson
f386e12f72 Add option to trigger "selection changed" callback in realtime 2022-01-18 18:23:00 +01:00
Rob Watson
bb3366ac9a Rename method, fix useEffect dependencies 2022-01-18 18:23:00 +01:00
Rob Watson
41fe0ce2b1 Centre zoom in/out on selection if availble 2022-01-18 18:23:00 +01:00
Rob Watson
aa80c9eb7e Bug fix: avoid space bar conflict with player interface 2022-01-18 18:23:00 +01:00
Rob Watson
9d90ed51e6 Bug fix: ensure playback ends at selection end 2022-01-18 18:23:00 +01:00
Rob Watson
a33057651d Update frontend with Tailwind.
- Replace inline CSS with Tailwind classes
- Improve page layout and scaling
- Add icons to ControlBar
- Small refactor of play/pause logic
- Add basic (not by any means final) colours
2022-01-18 18:23:00 +01:00
Rob Watson
ec3ac8996d Add tailwindcss 2022-01-18 18:23:00 +01:00
Rob Watson
d988a99f78 Update react-scripts -> 5.x 2022-01-18 18:23:00 +01:00
Rob Watson
58bbc06e6f Update deployment configuration to enable prefixes
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-18 17:56:37 +01:00
Rob Watson
fbbb2e2fda config: Add prefix support and test coverage
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-18 08:23:16 +01:00
Rob Watson
d136e00c59 Refactor zoom in/out, add test coverage
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-16 08:58:07 +01:00
Rob Watson
aa4d235c0c frontend: reduce redraw rate to 20ms
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-15 10:14:04 +01:00
Rob Watson
d8173cdace Add framesToDuration helper 2022-01-15 10:13:57 +01:00
Rob Watson
ed964cb58f Add toHHMMSS helper 2022-01-15 10:13:52 +01:00
Rob Watson
f33fa149fc Remove most useCallback usages
It is unclear whether these are actually significantly improving
performance and they add non-trivial complexity to the codebase,
especially when under heavy frontend development. Removing most of them
for now until it can be shown they are actually worthwhile.
2022-01-14 12:24:59 +01:00
Rob Watson
35b62f1e59 Fetch title, description and author from Youtube
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-13 20:05:09 +01:00
Rob Watson
aabd0f3252 HudCanvas: add useCallbacks
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-13 07:59:48 +01:00
Rob Watson
5e27c3db9a Fix filename typo
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-10 21:51:17 +01:00
Rob Watson
b0ccf17527 poc: legacy HTTP download for audio clips
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-10 21:35:31 +01:00
Rob Watson
af0674eb11 Add POST /api/media_sets/:id/clip.
All checks were successful
continuous-integration/drone Build is passing
This will allow for an HTTP/1.1 fallback for
MediaSetService.GetAudioSegment, enabling download of audio clips in
browsers that do not support the File System Access API.
2022-01-10 18:52:04 +01:00
Rob Watson
c7d5541379 Refactor response handling.
- Add FileSystem implementation to handle HTTP index files but constrain
  directory listings
- Refactor server implementation into a dedicated handler struct
- Add test coverage
2022-01-10 18:45:10 +01:00
Rob Watson
8a26b75127 Revert "Disable directory listings in http.FileServer."
All checks were successful
continuous-integration/drone/push Build is passing
The middleware approach breaks automatic handling of index files, which
in turn breaks assets serving. A custom file system will be required
instead.

This reverts commit 237747718870a43e47462c9b088681fb1cc1f817.
2022-01-10 08:39:03 +01:00
Rob Watson
2377477188 Disable directory listings in http.FileServer.
All checks were successful
continuous-integration/drone/push Build is passing
Closes #6
2022-01-08 12:16:30 +01:00
Rob Watson
8e9a4cf8c3 Fix linter error
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-07 19:54:56 +01:00
Rob Watson
04601bab2e frontend: Add Zoom buttons
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-07 19:51:53 +01:00
Rob Watson
06fce9af95 Refactor MediaSetService.GetPeaksForSegment.
Some checks failed
continuous-integration/drone/push Build is failing
- Fix bug where the function would return empty high bins when
  framesPerBin was a low value (< ~10)
- Improve readability
- Add error test cases
2022-01-07 13:34:18 +01:00
Rob Watson
5a4ee4e34f Add FFmpeg WorkerPool
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-05 19:49:47 +01:00
Rob Watson
33ee9645e7 Update backend dependencies
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-04 06:57:28 +01:00
Rob Watson
6cb462f769 Add test coverage for getVideoFromYoutube flow
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-04 06:51:25 +01:00