コード例 #1
0
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();
}
コード例 #2
0
void AudioScheduledSourceNode::setOnended(PassRefPtr<EventListener> listener)
{
    audioScheduledSourceHandler().setHasEndedListener();
    setAttributeEventListener(EventTypeNames::ended, listener);
}
コード例 #3
0
void AudioScheduledSourceNode::stop(double when, ExceptionState& exceptionState)
{
    audioScheduledSourceHandler().stop(when, exceptionState);
}