-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
Hi @molinla. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with 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. |
…t performance in playing
@nighca thanks to review. |
There was a problem hiding this 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) |
There was a problem hiding this comment.
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);放在这里做,自然的结果就是:在等的时候啥都不展示;前者一般会更好一点
以及 useFileUrl
、useAudioDuration
这些“hook”,与 react hook 类似,预期是放在组件中调用的,放在这里调用容易有内存泄漏的问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的我会再把加载逻辑放到组件里面
@molinla 冲突需要解决下 |
…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
* feat: implement audio preview * feat: complete audio player event ,audio player wave bar has different performance in playing
* 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]>
Overview
this pr is about implement audio preview
AudioPreview.vue
componentHoverProvider.ts
find mediaName logic