Send recorded audio to server

0 favourites
  • 2 posts
From the Asset Store
Create your own wss server and ws server with ssl and without ssl.
  • I'm developing a reading game to help children to improve their reading skills.

    I can manage to record sound from mic using Game Recorder and User Media, but I can't find a way to send an audio file to a server through a rest-apì. It's important because I have tools on server side that help me to analyze reading performance.

    Do you know know how to do it? Downloading the audio file or sharing it is useless in my case.

    Thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This should be possible with the Binary Data object and the AJAX object. Using AJAX you can make two requests:

    1. Firstly use the AJAX object 'Set response binary' action to save the next request in a Binary Data
    2. Then use AJAX to request the GameRecorder.RecordingURL - this will load the recording in to the Binary Data
    3. Once that completes, you can do another AJAX request with 'Post binary to URL'. Choose the same Binary Data object to send, and then enter your server URL to post to.

    In other words you first use AJAX to transfer the recording to a Binary Data object, and then you can use 'Post binary to URL' to send the contents of that Binary Data object to your server. You'll need to make sure the server can handle binary data coming in from the body of the POST request.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)