Giter VIP home page Giter VIP logo

Comments (4)

ShiiRochi avatar ShiiRochi commented on June 4, 2024

Any description about the matter or a link?

from wavesurfer-react.

sujitsagar avatar sujitsagar commented on June 4, 2024

Sorry for not adding this earlier.

Wavesurfer now has Markers support in the waveform. Can you add wrapper to it?

https://wavesurfer-js.org/example/markers/index.html

from wavesurfer-react.

ShiiRochi avatar ShiiRochi commented on June 4, 2024

@sujitsagar, as far as I can see, WaveSurfer.markers part is passed into plugins field, thus, consider it as an internal plugin of WaveSurfer. Try to pass it into wavesurfer-react's plugins field like so:

const plugins = [
  {
    plugin: WaveSurfer.markers,
    options: {
      markers: [
        {
          time: 5.5,
          label: "V1",
          color: '#ff990a'
        },
        {
          time: 10,
          label: "V2",
          color: '#00ffcc',
          position: 'top'
        }
      ]
    }
  },
  // some other stuff
];

Inside WaveSurfer container this plugin will be created in the following way (this is a simplified example) plugin[0].create(plugin[0].options), i.e. it is the same as WaveSurfer.markers.create(options).

Please, reply after trying out. If it works, then this issue can be closed.

from wavesurfer-react.

sujitsagar avatar sujitsagar commented on June 4, 2024

That's awesome. It worked, ShiiRochi.

Thank you so much. Closing this issue.

from wavesurfer-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.