Skip to content

how updatemenus buttons bind my own event function #223

@hackedbyxx

Description

@hackedbyxx
updatemenus: [{
                      x: 0.5,
                      y: 0,
                      yanchor: "top",
                      xanchor: "center",
                      showactive: false,
                      direction: "left",
                      type: "buttons",
                      pad: {"t": 150, "r": 10},
                      buttons: [{
                        method: "animate",
                        args: [null, {
                          fromcurrent: true,
                          transition: {
                            duration: 0,
                          },
                          frame: {
                            duration: 100,
                            redraw: false
                          }
                        }],
                        label: "Play"
                      }, {
                        method: "animate",
                        args: [
                          [null],
                          {
                            mode: "immediate",
                            transition: {
                              duration: 0
                            },
                            frame: {
                              duration: 0,
                              redraw: false
                            }
                          }
                        ],
                        label: "Pause"
                      }]
                    }]

like this when i start i want to play music and pause to pause play,it seems not support this, is there some way to reach that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions