Skip to content

Commit

Permalink
HTMLMediaElement watchtime logging is using incorrect message identif…
Browse files Browse the repository at this point in the history
…iers

https://bugs.webkit.org/show_bug.cgi?id=278526
rdar://134503892

Reviewed by Eric Carlson.

Each of the three logging events were using the same message identifier; the video codec
and audio codec events should use distict identifiers from the sourceType event.

* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::watchtimeTimerFired):

Canonical link: https://commits.webkit.org/282622@main
  • Loading branch information
jernoble committed Aug 22, 2024
1 parent 2405862 commit 524bcdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/WebCore/html/HTMLMediaElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9829,7 +9829,7 @@ void HTMLMediaElement::watchtimeTimerFired()
WebCore::DiagnosticLoggingClient::ValueDictionary videoCodecDictionary;
videoCodecDictionary.set(DiagnosticLoggingKeys::videoCodecKey(), static_cast<uint64_t>(videoCodecType->value));
videoCodecDictionary.set(DiagnosticLoggingKeys::secondsKey(), numberOfSeconds);
page->diagnosticLoggingClient().logDiagnosticMessageWithValueDictionary(DiagnosticLoggingKeys::mediaSourceTypeWatchTimeKey(), "Media Watchtime Interval By Video Codec"_s, videoCodecDictionary, ShouldSample::Yes);
page->diagnosticLoggingClient().logDiagnosticMessageWithValueDictionary(DiagnosticLoggingKeys::mediaVideoCodecWatchTimeKey(), "Media Watchtime Interval By Video Codec"_s, videoCodecDictionary, ShouldSample::Yes);
}();

// Then log watchtime messages per-audio-codec-type:
Expand All @@ -9854,7 +9854,7 @@ void HTMLMediaElement::watchtimeTimerFired()
WebCore::DiagnosticLoggingClient::ValueDictionary audioCodecDictionary;
audioCodecDictionary.set(DiagnosticLoggingKeys::audioCodecKey(), static_cast<uint64_t>(audioCodecType->value));
audioCodecDictionary.set(DiagnosticLoggingKeys::secondsKey(), numberOfSeconds);
page->diagnosticLoggingClient().logDiagnosticMessageWithValueDictionary(DiagnosticLoggingKeys::mediaSourceTypeWatchTimeKey(), "Media Watchtime Interval By Audio Codec"_s, audioCodecDictionary, ShouldSample::Yes);
page->diagnosticLoggingClient().logDiagnosticMessageWithValueDictionary(DiagnosticLoggingKeys::mediaAudioCodecWatchTimeKey(), "Media Watchtime Interval By Audio Codec"_s, audioCodecDictionary, ShouldSample::Yes);
}();
}

Expand Down

0 comments on commit 524bcdc

Please sign in to comment.