Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit b9ca97e

Browse files
feat: DEV-1713: Audio View (#503)
* Migrate audio to Timeline (WIP) * Migrating audio (WIP 2) * Extending the timeline * New Audio UI + Pinch-to-zoom * Volume controls and refactoring * Enable cursor hiding * Fixes and tuning * Remove FF * Refactor * Range click to set value * UX improvements * Audio fixes WIP * fix: DEV-1766: Unable to destroy Wavesurfer * Add Y-axis zoom Fix some styles using auto-prefixer * Cleanup * Fix image flex layout * Fix image flex layout (column) * fix: DEV-1811: Playback speed range * fix: DEV-1818: Horizontal scroll * fix: DEV-1813: Start over on play when the playback is finished
1 parent a519e76 commit b9ca97e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+10390
-8939
lines changed

examples/audio_regions/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<View>
22
<Header value="Select regions:"></Header>
33
<Labels name="label" toName="audio" choice="multiple">
4-
<Label value="Beat" background="yellow"></Label>
4+
<Label value="Beat" background="#98C84E"></Label>
55
<Label value="Voice" background="red"></Label>
66
<Label value="Guitar" background="blue"></Label>
77
<Label value="Other"></Label>

package.json

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,16 @@
4141
"@types/chroma-js": "^2.1.3",
4242
"@types/jest": "^27.0.1",
4343
"@types/keymaster": "^1.6.30",
44+
"@types/lodash.ismatch": "^4.4.6",
45+
"@types/nanoid": "^3.0.0",
4446
"@types/react-dom": "^17.0.11",
4547
"@types/strman": "^2.0.0",
48+
"@types/wavesurfer.js": "^6.0.0",
4649
"@typescript-eslint/eslint-plugin": "^4.20.0",
4750
"@typescript-eslint/parser": "^4.20.0",
4851
"antd": "^4.3.3",
4952
"array-move": "^1.0.0",
53+
"autoprefixer": "^10.4.2",
5054
"babel-jest": "^27.1.1",
5155
"babel-loader": "^8.2.2",
5256
"babel-plugin-import": "^1.13.0",
@@ -86,10 +90,13 @@
8690
"mobx": "^5.15.4",
8791
"mobx-react": "^6",
8892
"mobx-state-tree": "^3.16.0",
89-
"nanoid": "^2.1.11",
93+
"nanoid": "^3.3.0",
9094
"node-fetch": "^2.6.1",
9195
"node-sass": "^6.0.1",
9296
"pleasejs": "^0.4.2",
97+
"postcss": "^8.4.6",
98+
"postcss-loader": "^6.2.1",
99+
"postcss-preset-env": "^7.4.1",
93100
"prettier": "^1.19.1",
94101
"puppeteer": "^3.3.0",
95102
"raw-loader": "^4.0.2",
@@ -115,7 +122,7 @@
115122
"ts-jest": "^27.0.5",
116123
"typescript": "^4.2.3",
117124
"url-loader": "^4.1.1",
118-
"wavesurfer.js": "^3.3.3",
125+
"wavesurfer.js": "^6.0.1",
119126
"webpack": "^5.30.0",
120127
"webpack-cli": "^4.6.0",
121128
"webpack-dev-server": "^4.2.1",
@@ -176,20 +183,29 @@
176183
"env": {
177184
"test": {
178185
"presets": [
179-
["@babel/preset-env", {
180-
"targets": {
181-
"node": "current"
186+
[
187+
"@babel/preset-env",
188+
{
189+
"targets": {
190+
"node": "current"
191+
}
182192
}
183-
}],
184-
["@babel/preset-react", {
185-
"runtime": "automatic"
186-
}],
193+
],
194+
[
195+
"@babel/preset-react",
196+
{
197+
"runtime": "automatic"
198+
}
199+
],
187200
"@babel/preset-typescript"
188201
],
189202
"plugins": [
190-
["@babel/plugin-transform-react-jsx", {
191-
"runtime": "automatic"
192-
}]
203+
[
204+
"@babel/plugin-transform-react-jsx",
205+
{
206+
"runtime": "automatic"
207+
}
208+
]
193209
]
194210
}
195211
}
3.77 MB
Binary file not shown.

public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
}
5757
})(window, document);
5858
</script>
59+
5960
<script>
6061
domReady(function () {
6162
var ls = new LabelStudio("label-studio", {

src/assets/icons/fast.svg

Lines changed: 7 additions & 0 deletions
Loading

src/assets/icons/index.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ export { ReactComponent as LsExpand } from "./expand.svg";
1919
export { ReactComponent as LsCollapse } from "./collapse.svg";
2020
export { ReactComponent as LsDate } from "./date.svg";
2121
export { ReactComponent as IconPlusCircle } from "./plus_circle.svg";
22+
export { ReactComponent as IconSlow } from "./slow.svg";
23+
export { ReactComponent as IconFast } from "./fast.svg";
2224

2325
export { ReactComponent as IconCheck } from "./check.svg";
2426
export { ReactComponent as IconCross } from "./cross.svg";
@@ -27,6 +29,11 @@ export { ReactComponent as IconPlayerPause } from "./player/pause.svg";
2729
export { ReactComponent as IconPlayerPlay } from "./player/play.svg";
2830
export { ReactComponent as IconPlayerStep } from "./player/step.svg";
2931

32+
export { ReactComponent as IconVolumeMute } from "./volume-mute.svg";
33+
export { ReactComponent as IconVolumeHalf } from "./volume-half.svg";
34+
export { ReactComponent as IconVolumeFull } from "./volume-full.svg";
35+
36+
// Tools
3037
export { ReactComponent as IconBrushTool } from './tools/brush-tool.svg';
3138
export { ReactComponent as IconBrushToolSmart } from './tools/brush-tool-smart.svg';
3239
export { ReactComponent as IconCircleTool } from './tools/circle-tool.svg';
@@ -42,8 +49,8 @@ export { ReactComponent as IconHandTool } from './tools/hand-tool.svg';
4249
export { ReactComponent as IconBrightnessTool } from "./tools/brightness-tool.svg";
4350
export { ReactComponent as IconContrastTool } from "./tools/contrast-tool.svg";
4451

45-
export { ReactComponent as IconMagnifyTool } from './tools/magnify-tool.svg';
46-
export { ReactComponent as IconMinifyTool } from './tools/minify-tool.svg';
52+
export { ReactComponent as IconZoomIn } from './tools/magnify-tool.svg';
53+
export { ReactComponent as IconZoomOut } from './tools/minify-tool.svg';
4754
export { ReactComponent as IconMoveTool } from './tools/move-tool.svg';
4855
export { ReactComponent as IconRotateLeftTool } from './tools/rotate-left-tool.svg';
4956
export { ReactComponent as IconRotateRightTool } from './tools/rotate-right-tool.svg';

src/assets/icons/slow.svg

Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 4 additions & 3 deletions
Loading
Lines changed: 3 additions & 3 deletions
Loading

src/assets/icons/volume-full.svg

Lines changed: 5 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)