Skip to content

release test #532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/release-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ jobs:
echo $RELEASE_VERSION

- name: Install dependencies
run: pnpm install
run: |
pnpm install

- name: Build packages
run: pnpm run build
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ jobs:
echo $RELEASE_VERSION

- name: Install dependencies
run: pnpm install
run: |
pnpm install

- name: Build packages
run: pnpm run build
Expand Down
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
arch=x64
platform=linux
@shlab:registry=https://npm.shlab.tech/
registry=https://registry.npmjs.com
# shamefully-hoist=true
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ const AnnotationRightCorner = ({ noSave, fetchNext, totalSize }: AnnotationRight
});
} else if (task.media_type === MediaType.VIDEO) {
const videoAnnotations = await videoAnnotationRef.current?.getAnnotations();
const player = await videoAnnotationRef.current?.getPlayer();

result.width = player?.videoWidth();
result.height = player?.videoHeight();
result.duration = player?.duration();

Object.keys(videoAnnotations ?? {}).forEach((toolName) => {
if (toolName === 'tag') {
Expand Down Expand Up @@ -175,6 +180,9 @@ const AnnotationRightCorner = ({ noSave, fetchNext, totalSize }: AnnotationRight
innerSample = await videoAnnotationRef?.current?.getSample();
} else if (task.media_type === MediaType.AUDIO) {
const audioAnnotations = await audioAnnotationRef.current?.getAnnotations();
const player = await audioAnnotationRef.current?.getPlayer();

result.duration = player?.getDuration();

Object.keys(audioAnnotations ?? {}).forEach((toolName) => {
if (toolName === 'tag') {
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/pages/tasks.[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const Samples = () => {
<Tooltip
title={
<>
数据导入时上传 label.jsonl 即可导入预标注,预标注格式参考{' '}
数据导入时上传 labelu 导出的 json标注文件或组装成 jsonl 文件 即可导入预标注,预标注格式参考{' '}
<a
href="https://opendatalab.github.io/labelU/#/schema/pre-annotation/image"
target="_blank"
Expand Down
3 changes: 3 additions & 0 deletions packages/audio-annotator-react/src/MediaAnnotatorWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ const Content = styled.div`
export interface AudioAndVideoAnnotatorRef {
getAnnotations: () => AnnotationsWithGlobal;
getSample: () => MediaSample | undefined;
// TODO types
getPlayer: () => any;
}

export interface MediaPlayerProps {
Expand Down Expand Up @@ -732,6 +734,7 @@ function ForwardAnnotator(
return result;
},
getSample: () => currentSample,
getPlayer: () => playerRef.current,
}));

const attributeSide = useMemo(() => {
Expand Down
Loading