feat(core): audio playback rate (#11702)

fix AF-2470
This commit is contained in:
pengx17
2025-04-16 07:49:12 +00:00
parent 30184817da
commit 51316217af
9 changed files with 135 additions and 8 deletions
@@ -58,6 +58,13 @@ const AttachmentAudioPlayer = ({ block }: { block: AudioAttachmentBlock }) => {
[audioMedia]
);
const handlePlaybackRateChange = useCallback(
(rate: number) => {
audioMedia?.setPlaybackRate(rate);
},
[audioMedia]
);
const t = useI18n();
const enableAi = useEnableAI();
@@ -193,6 +200,8 @@ const AttachmentAudioPlayer = ({ block }: { block: AudioAttachmentBlock }) => {
onPause={handlePause}
onStop={handleStop}
onSeek={handleSeek}
playbackRate={playbackState?.playbackRate || 1.0}
onPlaybackRateChange={handlePlaybackRateChange}
notesEntry={
<CurrentServerScopeProvider>{notesEntry}</CurrentServerScopeProvider>
}