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

Function displaySongInPlaylistWaveform

src/fx/waveform.js:425–437  ·  view source on GitHub ↗

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

(element, svg, playlist, song)

Source from the content-addressed store, hash-verified

423 * @param {Integer} song - The index of the song we are displaying the waveform for.
424 */
425 function displaySongInPlaylistWaveform(element, svg, playlist, song) {
426 /*
427 Ensure it's the active song in the active playlist.
428 */
429 if (
430 config.active_playlist == playlist &&
431 config.playlists[config.active_playlist].active_index == song
432 ) {
433 let waveformPath = element.querySelector("svg g path");
434
435 waveformPath.setAttribute("d", svg);
436 }
437 }
438
439 /**
440 * Determines if the user is using waveforms

Callers 1

displayWaveFormsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected