bool AudioScheduledSourceNode::hasPendingActivity() const { // To avoid the leak, a node should be collected regardless of its // playback state if the context is closed. if (context()->isContextClosed()) return false; // If a node is scheduled or playing, do not collect the node prematurely // even its reference is out of scope. Then fire onended event if assigned. return audioScheduledSourceHandler().isPlayingOrScheduled(); }
void AudioScheduledSourceNode::setOnended(PassRefPtr<EventListener> listener) { audioScheduledSourceHandler().setHasEndedListener(); setAttributeEventListener(EventTypeNames::ended, listener); }
void AudioScheduledSourceNode::stop(double when, ExceptionState& exceptionState) { audioScheduledSourceHandler().stop(when, exceptionState); }