Closed homanchou closed 3 years ago
Agora WebSDK-NG does not include spatial audio out of the box. That's ok, 3D libraries such as Babylon.js do support spatial audio that can attach a MediaStream to a 3D mesh, https://github.com/BabylonJS/Babylon.js/blob/master/src/Audio/sound.ts#L215
The problem is, the Agora API on "user-published" only provides the remote audio as an interface IRemoteAudioTrack.
Is there a way to get at the underlying MediaStream so I can pass it to Babylon.js?
Platform and Browser:
Web/Chrome
SDK Version:
"agora-rtc-sdk-ng": "^4.1.0"
You can call getUserMedia to get the MediaStream and handle it by yourself, then use createCustomAudioTrack interface to create AgoraTrack with your MediaStreamTrack.
createCustomAudioTrack
Describe the bug
Agora WebSDK-NG does not include spatial audio out of the box. That's ok, 3D libraries such as Babylon.js do support spatial audio that can attach a MediaStream to a 3D mesh, https://github.com/BabylonJS/Babylon.js/blob/master/src/Audio/sound.ts#L215
The problem is, the Agora API on "user-published" only provides the remote audio as an interface IRemoteAudioTrack.
Is there a way to get at the underlying MediaStream so I can pass it to Babylon.js?
Platform and Browser:
Web/Chrome
SDK Version:
"agora-rtc-sdk-ng": "^4.1.0"