MediaStreamTrack.onended
event handler is used to specify a function which serves as an EventHandler
to be called when the ended
event occurs on the track. This event occurs when the track will no longer provide data to the stream for any reason, including the end of the media input being reached, the user revoking needed permissions, the source device being removed, or the remote peer ending a connection.onended
property of the OscillatorNode
interface is used to set the event handler for the ended event, which fires when the tone has stopped playing.