Closed mohamadabdelhady closed 2 years ago
Change this:
` load_audio()
{
this.sound = new Howl({
src: [this.file_path],
html5: true,
autoplay:false,
onplay: function(){
this.update_seekbar();
} `
To:
load_audio()
{
this.sound = new Howl({
src: [this.file_path],
html5: true,
autoplay:false,
onplay: () => {
// => this. <= is not avail in function() but is in ES6 anonymous arrow funct () =>
this.update_seekbar();
}
It is a javascript problem not a howlerjs problem ...
@lustremedia ok, thanks for replaying
Please close this ticket if it is not further related to howlerjs
I am coding an audio player for my website, I made the function update_seekbar to update the value of the audio_seek variable which is bind to the value of the input type range tag, so the seek bar changes whenever the audio progresses, the update_seekbar function should fire when onplay function is fired which is a holwerjs function that fire whenever the audio begin to play, my problem that I keep getting this error "Uncaught TypeError: this.update_seekbar is not a function" and don't know what is causing it or how to fix it.