MCPcopy
hub / github.com/serversideup/amplitudejs / displaySongWaveform

Function displaySongWaveform

src/fx/waveform.js:406–415  ·  view source on GitHub ↗

* Displays a song wave form. * * @param {Node} element - Element to display the waveform in. * @param {SVG} svg - The waveform path. * @param {Integer} song - The index of the song we are displaying the * waveform for.

(element, svg, song)

Source from the content-addressed store, hash-verified

404 * waveform for.
405 */
406 function displaySongWaveform(element, svg, song) {
407 /*
408 Ensure it's the active song being displayed.
409 */
410 if (config.active_index == song) {
411 let waveformPath = element.querySelector("svg g path");
412
413 waveformPath.setAttribute("d", svg);
414 }
415 }
416
417 /**
418 * Displays a song in playlist waveform.

Callers 1

displayWaveFormsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected