bbc / peaks.js

JavaScript UI component for interacting with audio waveforms
https://waveform.prototyping.bbc.co.uk
GNU Lesser General Public License v3.0
3.2k stars 279 forks source link

Peak js-not able to add and update custom attributes to segments #339

Closed jaijos closed 4 years ago

jaijos commented 4 years ago

Hello

I have tried

peaksInstance.segments.add({ startTime: lastPonint, endTime: peaksInstance.player.getCurrentTime(), labelText: "", editable: false, speakerId: "", })

and

currentSegment.update(speakerId:"SpeakerId1");

But both the codes are not working.

All the predefined attributes are getting added, but not the user-defined or the custom attributes.

Please Help. It's an urgent requirement and I am stuck here.

Thanks in advance.

chrisn commented 4 years ago

This works fine for me in Peaks.js 0.22.0. Please check that you are using the latest version.

jaijos commented 4 years ago

Thank you Chris, I will try after updating my package with the latest version.

On Tue, Oct 6, 2020 at 6:00 PM Chris Needham notifications@github.com wrote:

This works fine for me in Peaks.js 0.22.0. Please check that you are using the latest version.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bbc/peaks.js/issues/339#issuecomment-704235528, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARIXKUPSFP43QEP5XVIFIR3SJMEVBANCNFSM4SF53BUQ .

jaijos commented 4 years ago

Hi Chris,

I have tried to install 0.22.0 npm install --save peaks.js@0.22.0

But I am getting an error No matching version found for peaks.js@0.22.0.

Even when I did google search for latest version of peaks.js, it is showing 0.21.0, which is already installed in my app.

On Tue, Oct 6, 2020 at 6:42 PM Chris Needham notifications@github.com wrote:

Closed #339 https://github.com/bbc/peaks.js/issues/339.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bbc/peaks.js/issues/339#event-3845362468, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARIXKUMW5UZIKW3KRK7MRCTSJMJUNANCNFSM4SF53BUQ .

chrisn commented 4 years ago

OK, it seems 0.22.0 hasn't been published to NPM yet. I'll reply here when that is done.

jaijos commented 4 years ago

Okay, sure. Thank you.

On Tue, Oct 6, 2020 at 7:07 PM Chris Needham notifications@github.com wrote:

OK, it seems 0.22.0 hasn't been published to NPM yet. I'll reply here when that is done.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bbc/peaks.js/issues/339#issuecomment-704274636, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARIXKUI55YIUVW6RKLX2SMTSJMMTBANCNFSM4SF53BUQ .

chrisn commented 4 years ago

Peaks.js 0.22.0 is now available via NPM. Sorry for the inconvenience.

jaijos commented 4 years ago

Issue is resolved. Installed 0.22.0 version. I am able to add and update custom attribute to a segment now. Thank you.

On Wed, Oct 7, 2020 at 12:02 AM Chris Needham notifications@github.com wrote:

Peaks.js 0.22.0 is now available via NPM. Sorry for the inconvenience.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bbc/peaks.js/issues/339#issuecomment-704469202, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARIXKUKGGO5Y66DUDRFLO2TSJNPELANCNFSM4SF53BUQ .