Using Howler to play an MP3 with the play() method?

20 Views Asked by At

In this Typescript Demo if autoplay is commented out, the sound does not play, and I am expecting it to since play() is called:

const mp3: string = `https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3`;

var sound = new Howl({
//  autoplay: true,
  loop: true,
  volume: 100,
  format: ['mp3'],
  src: [mp3],
});
sound.play();

Any ideas?

0

There are 0 best solutions below