How do I record audio from mic? UserMedia Broken??

0 favourites
  • 10 posts
From the Asset Store
126 audio files divided in: music, radio voices, SFX
  • Good Day,

    So I was trying to do a simple program that would record audio from a microphone on the push of a button.

    Then after another button is pushed it will stop recording and save the file to the local drive.

    Main issue is I can't find how to get it to record using UserMedia.

    I read the instructions as an action to use "Start Recording Canvas", but can't see to find that action no matter what I have in my project.

    Please let me know what I am doing wrong or if this is not possible to do.

    Thanks,

    Int.

  • I think browsers block requesting the camera/microphone on startup for security reasons. You have to use the action in a user input trigger, like "On button clicked" or "On touched sprite".

  • Thanks for the reply, these are the only actions I am seeing after a button is pressed.

  • I'm not sure why you showed a picture of those actions? That's just the normal action list for User Media. I meant to move the 'Request microphone' action inside an event that is triggered when the user does some input, like clicking a button.

  • Even if i do that I still get the same set of actions from the UserMedia. There is no "Start recording canvas" available as an action.

    I did try the Request Microphone action on startup and for testing it looked to work but need to get it to where I can record the microphone and save the session.

    That is my big hang up and cant find any examples on how to do that.

    Figured it would be simple.

  • Oh, I thought you were having trouble with the "request microphone" action.

    Which instructions are you reading? The canvas recording feature was moved to the Game Recorder object quite a while ago. So you need to use a different object completely to record the canvas. I'm also still not quite clear what it is you're trying to record: do you want an audio recording from the microphone (which User Media does), a recording of the game (which Game Recorder does), or both?

  • I just want a recording from the microphone.

    !. User pushes button and audio plays. "Please record after the beep" *beep*

    2. recording starts

    3. User pushes button to stop recording. Audio plays "Your recording has been saved"

    4. Then the audio is saved "recording[DATE}+{time} That is all I am trying to do but I cant seem to figure out how to get it to record from the microphone

  • In that case, you can use 'Request microphone' (but make sure it is in a user input event), and then use the Game Recorder object's Start User Media recording once the microphone request is approved.

  • So i was reading the construct 2 manual and guess thats where I was getting confused about what objects to add.

    Thank you for the clarification and now it starts and stops recording but dont see the way to save the file.

    Do you guys have an example I can take a look at, can't find one on the site...?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think i found the command I was looking for.

    Going to test but thanks for the great feedback

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