Bug 1555197 - part3 : modify log. r=jya

Add and modify some log content in order to help debugging.

Differential Revision: https://phabricator.services.mozilla.com/D32936

--HG--
extra : moz-landing-system : lando
This commit is contained in:
alwu 2019-05-30 07:39:40 +00:00
parent de12be8c5d
commit 4b5ebae438
2 changed files with 5 additions and 2 deletions

View File

@ -168,7 +168,7 @@ void TextTrack::GetId(nsAString& aId) const {
}
void TextTrack::AddCue(TextTrackCue& aCue) {
WEBVTT_LOG("AddCue %p", &aCue);
WEBVTT_LOG("AddCue %p [%f:%f]", &aCue, aCue.StartTime(), aCue.EndTime());
TextTrack* oldTextTrack = aCue.GetTrack();
if (oldTextTrack) {
ErrorResult dummy;
@ -349,6 +349,8 @@ void TextTrack::GetCurrentCuesAndOtherCues(
const double playbackTime = mediaElement->CurrentTime();
for (uint32_t idx = 0; idx < mCueList->Length(); idx++) {
TextTrackCue* cue = (*mCueList)[idx];
WEBVTT_LOG("cue %p [%f:%f], playbackTime=%f", cue, cue->StartTime(),
cue->EndTime(), playbackTime);
if (cue->StartTime() <= playbackTime && cue->EndTime() > playbackTime) {
WEBVTT_LOG("Add cue %p [%f:%f] to current cue list", cue,
cue->StartTime(), cue->EndTime());

View File

@ -1113,8 +1113,9 @@ XPCOMUtils.defineLazyPreferenceGetter(this, "supportPseudo",
// @param controls : A Control bar element. Cues' position will be
// affected and repositioned according to it.
WebVTT.processCues = function(window, cues, overlay, controls) {
LOG(`=== processCues ===`);
if (!cues) {
LOG(`Abort processing because no cue.`);
LOG(`clear display and abort processing because of no cue.`);
clearAllCuesDiv(overlay);
lastDisplayedCueNums = 0;
return;