示例#1
0
void
TextTrackManager::NotifyCueRemoved(TextTrackCue& aCue)
{
  if (mNewCues) {
    mNewCues->RemoveCue(aCue);
  }
  DispatchTimeMarchesOn();
}
void TextTrackManager::NotifyCueRemoved(TextTrackCue& aCue) {
  WEBVTT_LOG("NotifyCueRemoved, cue=%p", &aCue);
  if (mNewCues) {
    mNewCues->RemoveCue(aCue);
  }
  TimeMarchesOn();
  DispatchUpdateCueDisplay();
}
示例#3
0
void
TextTrackManager::NotifyCueRemoved(TextTrackCue& aCue)
{
  WEBVTT_LOG("NotifyCueRemoved");
  if (mNewCues) {
    mNewCues->RemoveCue(aCue);
  }
  DispatchTimeMarchesOn();
  if (aCue.GetActive()) {
    // We remove an active cue, need to update the display.
    DispatchUpdateCueDisplay();
  }
}
示例#4
0
void
TextTrackManager::RemoveTextTrack(TextTrack* aTextTrack, bool aPendingListOnly)
{
  if (!mPendingTextTracks || !mTextTracks) {
    return;
  }

  mPendingTextTracks->RemoveTextTrack(aTextTrack);
  if (aPendingListOnly) {
    return;
  }

  mTextTracks->RemoveTextTrack(aTextTrack);
  // Remove the cues in mNewCues belong to aTextTrack.
  TextTrackCueList* removeCueList = aTextTrack->GetCues();
  if (removeCueList) {
    for (uint32_t i = 0; i < removeCueList->Length(); ++i) {
      mNewCues->RemoveCue(*((*removeCueList)[i]));
    }
    DispatchTimeMarchesOn();
  }
}
void TextTrackManager::RemoveTextTrack(TextTrack* aTextTrack,
                                       bool aPendingListOnly) {
  if (!mPendingTextTracks || !mTextTracks) {
    return;
  }

  WEBVTT_LOG("RemoveTextTrack TextTrack %p", aTextTrack);
  mPendingTextTracks->RemoveTextTrack(aTextTrack);
  if (aPendingListOnly) {
    return;
  }

  mTextTracks->RemoveTextTrack(aTextTrack);
  // Remove the cues in mNewCues belong to aTextTrack.
  TextTrackCueList* removeCueList = aTextTrack->GetCues();
  if (removeCueList) {
    WEBVTT_LOGV("RemoveTextTrack removeCuesNum=%d",
                removeCueList->Length());
    for (uint32_t i = 0; i < removeCueList->Length(); ++i) {
      mNewCues->RemoveCue(*((*removeCueList)[i]));
    }
    TimeMarchesOn();
  }
}