MediaRecorder : changing the word on the button

PennController for IBEX Forums Support MediaRecorder : changing the word on the button

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6894
    suzanne
    Participant

    Hi,
    I am running an experiment using the controler MediaRecorder.
    I would like to translate the word on the button « record ».
    I manage to change the word on the button to stop recording and to rerecording by changing this this.recording=!1,i.text(“XXX”),clearInterval(null)):(i.text(“XXX”) in the PennController.js file.
    But I would like also to change the word on the button before the recording.
    Could you help me?
    Thanks in advance!

    #6899
    Jeremy
    Keymaster

    Hi,

    You can hide the default button by adding a CSS rule to PennController.css:

    .MediaRecorder-record {
        display: none;
    }
    

    Then you can code the buttons yourself:

    newMediaRecorder("audio").print(),
    newButton("Enregistrer")
        .callback(
            getMediaRecorder("audio").record(),
            getButton("Enregistrer").remove(),
            getButton("Continuer").remove(),
            getButton("Arrêter").print()
        )
        .print()
    ,
    newButton("Arrêter")
        .callback(
            getMediaRecorder("audio").stop(),
            getButton("Arrêter").remove(),
            getButton("Enregistrer").print(),
            getButton("Continuer").print()
        )
    ,
    newButton("Continuer")
        .wait()
    

    Here’s a live example: https://farm.pcibex.net/r/aqHqaG/

    Jeremy

    #6922
    suzanne
    Participant

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.