AgoraIO-Community / Agora_Unity_WebGL

WebGL plugin for Unity, beta release
MIT License
111 stars 25 forks source link

[BUG] RtcEngine.StartRecording(문자열 경로, AUDIO_RECORDING_QUALITY_TYPE 유형) 및 RtcEngine.StopRecording() #316

Closed NHRIJDG closed 6 months ago

NHRIJDG commented 6 months ago

Describe the bug RtcEngine.StartAudioRecording(string path, AUDIO_RECORDING_QUALITY_TYPE type) and RtcEngine.StopAudioRecording()

Using "RtcEngine.StartAudioRecording(string path, AUDIO_RECORDING_QUALITY_TYPE type)" in a WebGL environment obtains AudioFile, This audio file only has my voice and no one else's voice. but Windows, Mac, LInux environment, every audience's sound is in the audio file.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'File' -> 'BuildSetting' -> 'Scenes In Build' and setting Scens index like this : index 0 : API-Example/HomeMenu, Index 1 : API-Example/device-manager/DeviceManager'
  2. Add the global variable within AgoraDeviceManager Class, which bool IsRecording = false;
  3. Add public button (name is "recordingButton") within AgoraDeviceManager Class
  4. Add Method within AgoraDeviceManager Class, RecordingAction like this : void RecordingAction() { if (IsRecording) { IsRecording = false; _rtcEngine.StopAudioRecording(); } else { IsRecording = true; string fileName = "SampleAudioRecordFile.wav"; _rtcEngine.StartAudioRecording(fileName, AUDIO_RECORDING_QUALITY_TYPE.AUDIO_RECORDING_QUALITY_MEDIUM); } }
  5. In the Awake Method Add this Line. "recordingButton.onClick.AddListener(RecordingAction);"
  6. In the UnityProject Add a new button under the canvas of the DeviceManager Scene
  7. Find the Agora Device Manager class within the Device Manager Scene's Hierarchy and insert the newly added button into the "RecordingButton" of the Agora Device Manager.
  8. Build WebGL And Play Index.html
  9. go to DeviceManager
  10. click to 'JoinChannel'
  11. Click to 'button' and talk to others!
  12. click to 'button'
  13. Then you can get an audio file that is speaking alone in the void.
  14. Copy This Unity Project
  15. Switch platform to Windows, Mac, Linux
  16. Build Project.
  17. Play exe File
  18. Try 9-12 again
  19. you get All Audience voice File

Expected behavior Like Windows, Mac, and Linux environments, WebGL environments should also be able to obtain audio files that contain the sounds of all audiences.

Desktop (please complete the following information):

icywind commented 6 months ago

Thanks for providing the steps to reproduce the issue. Unfortunately, due to the nature of the difference in the platforms, the WebGL SDK does not support recording all users. If you seek to record only a particular user track, you can try to create new code like the current function _startAudioRecordingWGL in Assets/WebGLTemplates/AgoraTemplate/AgoraWebSDK/libs/audiosystem.js. However, there isn't a good solution to record composite users on web using the SDK methods. To properly get a recording, we recommend using the Cloud Recording service.