Bug 283034

Summary: The audio is choppy and the playbackRate is not working when playing 2.0x audio with AudioContext.
Product: WebKit Reporter: Ronan Chi <wbxl2000>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Critical CC: eric.carlson, jer.noble, rychouwei, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 18   
Hardware: iPhone / iPad   
OS: iOS 18   
Attachments:
Description Flags
Reproductions Files none

Ronan Chi
Reported 2024-11-12 20:24:32 PST
Created attachment 473213 [details] Reproductions Files I am using AudioContext API to mix audio track in iOS. But I found that when setting playbackRate to 2.0, and use Audio Destination Node to create a new audio stream, the audio is choppy and the playbackRate is not working. Is there any solution for this? Reproductions Link: https://web.sdk.qcloud.com/trtc/webrtc/v5/test/qer/audio-mixer/ios.html Reproductions Source Code: ```js function playMusicWithAudioContext(playbackRate = 1.0) { audioElement.pause(); const newAudioElement = new Audio('./count.mp3'); newAudioElement.playbackRate = playbackRate; const audioContext = new AudioContext(); const node = audioContext.createMediaElementSource(newAudioElement); const destination = audioContext.createMediaStreamDestination(); node.connect(destination); const stream = destination.stream; const player = document.createElement('audio'); player.srcObject = stream; newAudioElement.play(); player.play(); } ```
Attachments
Reproductions Files (410.37 KB, application/zip)
2024-11-12 20:24 PST, Ronan Chi
no flags
rychouwei
Comment 1 2024-11-12 23:20:45 PST
I have same issue
Radar WebKit Bug Importer
Comment 2 2024-11-19 20:25:15 PST
Note You need to log in before you can comment on or make changes to this bug.