void TextTrackManager::RemoveTextTrack(TextTrack* aTextTrack, bool aPendingListOnly) { mPendingTextTracks->RemoveTextTrack(aTextTrack); if (aPendingListOnly) { return; } mTextTracks->RemoveTextTrack(aTextTrack); }
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(); } }