Skip to content
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

feat(spx-gui): implement audio preview #908

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

molinla
Copy link
Contributor

@molinla molinla commented Sep 13, 2024

Overview

this pr is about implement audio preview

  • AudioPreview.vue component
  • implement HoverProvider.ts find mediaName logic
  • implement audio wave bar
  • audio component can play, pause, reset

Copy link

qiniu-prow bot commented Sep 13, 2024

Hi @molinla. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@molinla
Copy link
Contributor Author

molinla commented Sep 15, 2024

#872

@molinla
Copy link
Contributor Author

molinla commented Sep 18, 2024

@nighca thanks to review.

Copy link
Collaborator

@nighca nighca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先 merge

} else {
layerContents.push(...this.createDocContents(content, definition))
if (sound) {
const [audioSrc] = useFileUrl(() => sound.file)
Copy link
Collaborator

@nighca nighca Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: 这些获取 url、duration 的事情都放在组件里去做可能会更合适一点

放在组件里做的话,自然的结果就是:在获取 url、duration 等待的时候,会展示一个 audio card(里边空白或者放个 loading);放在这里做,自然的结果就是:在等的时候啥都不展示;前者一般会更好一点

以及 useFileUrluseAudioDuration 这些“hook”,与 react hook 类似,预期是放在组件中调用的,放在这里调用容易有内存泄漏的问题

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的我会再把加载逻辑放到组件里面

@nighca
Copy link
Collaborator

nighca commented Sep 18, 2024

@molinla 冲突需要解决下
image

…to audio_player

# Conflicts:
#	spx-gui/src/components/editor/code-editor/coordinators/hoverProvider.ts
#	spx-gui/src/components/editor/code-editor/coordinators/index.ts
#	spx-gui/src/components/editor/code-editor/ui/EditorSidebar.vue
@nighca nighca merged commit 6306e48 into goplus:trailhead_code Sep 18, 2024
3 checks passed
@molinla molinla deleted the audio_player branch September 18, 2024 02:14
callme-taota pushed a commit to callme-taota/builder that referenced this pull request Sep 19, 2024
* feat: implement audio preview

* feat: complete audio player event ,audio player wave bar has different performance in playing
nighca pushed a commit that referenced this pull request Sep 20, 2024
* feat: fill the document.

* feat`WASM Compiler`: get struct field & method into completion item. (#913)

* feat: get struct field & method into completion item .

* fix: fix the bug of wrong if statements.

* refactor(spx): inputAssistant Provider will filter Token effect in different  code page (#911)

* feat: add animation in sidebar, refactor sidebar inputAssistant to show whole categories

* feat: filter inputAssistant item in different code page

* refactor: rename some vue ref element variable name

* refactor: refactor tokens property sample, refactor inputAssistant will not merge wasm usages.

* fix: fix some tokens sample

* refactor: refactor `usageEffect2Icon` into 2 functions, add `definitionStructName2Target` to transform wasm definition into TokenUsage Target

* feat(spx-gui): implement audio preview (#908)

* feat: implement audio preview

* feat: complete audio player event ,audio player wave bar has different performance in playing

* fix: rename `getScopesItems` -> `getCompletionItems`. (#916)

fix: fix wrong if statement.

* feat(spx-gui): completion menu doc (#917)

* feat: completion menu document

* refactor: refactor CompletionItem props undefined

* refactor: update completion menu doc css animation and method `getCompletionItemByIdx`

* docs: add necessary comment in completion menu item

* refactor(spx-gui): refactor Audio player props (#918)

* refactor: refactor `AudioPreview.vue` props into `File` and update related types

* fix: fix `PreprocessModal.vue` component css style variable incorrect using

* fix: fix `File` class related by using reactive ts type mismatch error

* feat: add some document.

---------

Co-authored-by: molinla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants