Skip to content

Commit

Permalink
refactor(octra): build system works again
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpoemp committed Sep 18, 2023
1 parent 8524486 commit 3535df3
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import {
import { timer } from 'rxjs';
import { SupportedFilesModalComponent } from '../../modals/supportedfiles-modal/supportedfiles-modal.component';
import { DefaultComponent } from '../default.component';
import { AudioManager, fileListToArray, OAudiofile } from '@octra/web-media';
import { AudioManager, fileListToArray } from '@octra/web-media';
import { OAudiofile } from '@octra/media';

@Component({
selector: 'octra-dropzone',
Expand Down
2 changes: 1 addition & 1 deletion libs/annotation/src/lib/converters/AnnotJSONConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
OctraAnnotationFormatType,
} from './Converter';
import { OAnnotJSON } from '../annotjson';
import { OAudiofile } from '@octra/web-media';
import { OAudiofile } from '@octra/media';

export class AnnotJSONConverter extends Converter {
override _name: OctraAnnotationFormatType = 'AnnotJSON';
Expand Down
2 changes: 1 addition & 1 deletion libs/annotation/src/lib/converters/BundleJSONConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
OctraAnnotationFormatType,
} from './Converter';
import { IAnnotJSON, OAnnotJSON } from '../annotjson';
import { OAudiofile } from '@octra/web-media';
import { OAudiofile } from '@octra/media';

export interface Bundle {
ssffFiles: {
Expand Down
2 changes: 1 addition & 1 deletion libs/annotation/src/lib/converters/CTMConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from './Converter';
import { contains } from '@octra/utilities';
import { OAnnotJSON, OLabel, OSegment, OSegmentLevel } from '../annotjson';
import { OAudiofile } from '@octra/web-media';
import { OAudiofile } from '@octra/media';

export class CTMConverter extends Converter {
override _name: OctraAnnotationFormatType = 'CTM';
Expand Down
2 changes: 1 addition & 1 deletion libs/annotation/src/lib/converters/Converter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { OAnnotJSON } from '../annotjson';
import { OAudiofile } from '@octra/web-media';
import { OAudiofile } from '@octra/media';

export type OctraAnnotationFormatType =
| 'AnnotJSON'
Expand Down
2 changes: 1 addition & 1 deletion libs/annotation/src/lib/converters/ELANConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from './Converter';
import { OAnnotJSON, OLabel, OSegment, OSegmentLevel } from '../annotjson';
import { DateTime } from 'luxon';
import { OAudiofile } from '@octra/web-media';
import { OAudiofile } from '@octra/media';

export class ELANConverter extends Converter {
override _name: OctraAnnotationFormatType = 'ELAN';
Expand Down
2 changes: 1 addition & 1 deletion libs/annotation/src/lib/converters/PartiturConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
OSegment,
OSegmentLevel,
} from '../annotjson';
import { OAudiofile } from '@octra/web-media';
import { OAudiofile } from '@octra/media';

export class PartiturConverter extends Converter {
override _name: OctraAnnotationFormatType = 'BASPartitur';
Expand Down
2 changes: 1 addition & 1 deletion libs/annotation/src/lib/converters/PraatTableConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
OSegmentLevel,
} from '../annotjson';
import { contains } from '../functions';
import { OAudiofile } from '@octra/web-media';
import { OAudiofile } from '@octra/media';

export class PraatTableConverter extends Converter {
override _name: OctraAnnotationFormatType = 'PraatTextTable';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
OSegmentLevel,
} from '../annotjson';
import { contains } from '../functions';
import { OAudiofile } from '@octra/web-media';
import { OAudiofile } from '@octra/media';

export class PraatTextgridConverter extends Converter {
override _name: OctraAnnotationFormatType = 'TextGrid';
Expand Down
2 changes: 1 addition & 1 deletion libs/annotation/src/lib/converters/SRTConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
OctraAnnotationFormatType,
} from './Converter';
import { OAnnotJSON, OLabel, OSegment, OSegmentLevel } from '../annotjson';
import { OAudiofile } from '@octra/web-media';
import { OAudiofile } from '@octra/media';

export class SRTConverter extends Converter {
override _name: OctraAnnotationFormatType = 'SRT';
Expand Down
2 changes: 1 addition & 1 deletion libs/annotation/src/lib/converters/TextConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
OctraAnnotationFormatType,
} from './Converter';
import { OAnnotJSON, OLabel, OSegment, OSegmentLevel } from '../annotjson';
import { OAudiofile } from '@octra/web-media';
import { OAudiofile } from '@octra/media';

export class TextConverter extends Converter {
override _name: OctraAnnotationFormatType = 'PlainText';
Expand Down
2 changes: 1 addition & 1 deletion libs/annotation/src/lib/converters/WebVTTConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
OSegment,
OSegmentLevel,
} from '../annotjson';
import { OAudiofile } from '@octra/web-media';
import { OAudiofile } from '@octra/media';

export class WebVTTConverter extends Converter {
override _name: OctraAnnotationFormatType = 'WebVTT';
Expand Down
3 changes: 1 addition & 2 deletions libs/annotation/src/lib/functions.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { OLabel, OSegment } from './annotjson';
import { Converter, IFile } from './converters';
import { SampleUnit } from '@octra/media';
import { OAudiofile, SampleUnit } from '@octra/media';
import { OctraAnnotationSegment } from './octraAnnotationSegment';
import { OAudiofile } from '@octra/web-media';

export function convertFromSupportedConverters(
converters: Converter[],
Expand Down
1 change: 1 addition & 0 deletions libs/media/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './lib/audio';
export * from './lib/types';
export * from './lib/audio/audio-file';
20 changes: 20 additions & 0 deletions libs/media/src/lib/audio/audio-file.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export interface IAudioFile {
name: string;
size: number;
duration: number;
sampleRate: number;
url?: string;
type: string;
}

// TODO add extension and use name without it
export class OAudiofile implements IAudioFile {
name!: string;
// need type attribute
arraybuffer?: ArrayBuffer;
size!: number;
duration!: number;
sampleRate!: number;
url?: string;
type!: string;
}
21 changes: 0 additions & 21 deletions libs/web-media/src/lib/audio/audio-info.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
import { SampleUnit } from '@octra/media';
import { FileInfo } from '../data-info';

export interface IAudioFile {
name: string;
size: number;
duration: number;
sampleRate: number;
url?: string;
type: string;
}

// TODO add extension and use name without it
export class OAudiofile implements IAudioFile {
name!: string;
// need type attribute
arraybuffer?: ArrayBuffer;
size!: number;
duration!: number;
sampleRate!: number;
url?: string;
type!: string;
}

export class AudioInfo extends FileInfo {
private readonly _bitrate: number = -1;

Expand Down
3 changes: 2 additions & 1 deletion libs/web-media/src/lib/audio/audio-resource.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AudioInfo, OAudiofile } from './audio-info';
import { AudioInfo } from './audio-info';
import { MediaResource } from '../media-resource';
import { SourceType } from '../types';
import { OAudiofile } from '@octra/media';

export class AudioResource extends MediaResource {
private _info: AudioInfo;
Expand Down

0 comments on commit 3535df3

Please sign in to comment.