So I made a JavaScript Object, which makes an element in the DOM, and what I use my methods for, is to for example play the audio, set the duration of the audio etc. However, a method that I made inside my object apparently doesn't exist. By the way, I'm new, so I don't really know what I did wrong... But here is my code:
function Audio(paramSource) {
var object = document.createElement("audio");
(...)
function play() {
object.play();
};
(...)
};
var myAudio = new Audio("http://tufda.net/space/limewire.mp3");
myAudio.play();
Thanks in advance :)!
new Audiomethod surely already exists, and you shouldn't be overwriting it