Skip to content

Waves are showing with default audio controls but not with custom controls #45

Answered by foobar404
nitria asked this question in Q&A
Discussion options

You must be logged in to vote
let audio = new Audio();
audio.id = "myAudio";

let wave = new Wave();
wave.fromElement("myAudio","canvasID", {});

Something like this might work, passing it the id of a virtual html element, if not you could try this

let audio = new Audio();

let wave = new Wave();
wave.fromElement(audio ,"canvasID", {});

I believe there is an override that lets you pass an audio element instead of an id

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@nitria
Comment options

@foobar404
Comment options

@nitria
Comment options

Answer selected by foobar404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants