내 새 웹 페이지의 경우 웨이브 형식의 오디오 플레이어를 통합해야하며 wavesurfer.js 패키지를 사용하고 있습니다. 그들이 웨이브 폼의 다른 위치에 맞춤 마커를 추가하는 것에 대해 말하면서 지금까지 작동하지 못했습니다. 내 코드는 다음과 같습니다 :Wavesurfer.js : 맞춤 마커를 표시하는 방법?
'use strict';
// Create an instance
var wavesurfer = Object.create(WaveSurfer);
// Init & load audio file
document.addEventListener('DOMContentLoaded', function() {
var options = {
container : document.querySelector('#waveform'),
waveColor : 'violet',
progressColor : 'purple',
loaderColor : 'purple',
cursorColor : 'navy'
};
if (location.search.match('scroll')) {
options.minPxPerSec = 100;
options.scrollParent = true;
}
if (location.search.match('normalize')) {
options.normalize = true;
}
// Init
wavesurfer.init(options);
// Load audio from URL
wavesurfer.load('example/media/demo.wav');
// Regions
if (wavesurfer.enableDragSelection) {
wavesurfer.enableDragSelection({
color: 'rgba(0, 255, 0, 0.1)'
});
}
});
// Play at once when ready
wavesurfer.on('ready', function() {
wavesurfer.play();
wavesurfer.mark({id: 'chorus', position: 10})
});
그리고 콘솔에서 아래와 같은 오류가 점점 :
Uncaught TypeError: undefined is not a function
은 아무도 이것에 대한 해결책을 제시 할 수 있습니까?