Javascript:Why setTimeout(audio.play,500) not working?
This is not working(and Firefox 52 said TypeError: 'play' called on an object that does not implement interface HTMLMediaElement.
):
setTimeout(document.getElementsByTagName('audio')[0].play,1000.5)
This is working:
setTimeout(function(){document.getElementsByTagName('audio')[0].play()}, 1000.5);
Why?also I can't understand that error prompt