The audio keeps playing when I use the remove function to remove the video. This doesn’t happen if I don’t include autoplay as an attribute in the video tag. I tried different things and nothing seems to work.
//$("#video").pause();
//$("#video").stop();
$("#video").empty();
$("#video").remove();
Might be a little late, but I had the same issue and the above answer didn’t worked for me (yes the tag was created by jQuery)
I got it working by using