summaryrefslogtreecommitdiffstats
path: root/dom/html/HTMLMediaElement.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/html/HTMLMediaElement.h')
-rw-r--r--dom/html/HTMLMediaElement.h84
1 files changed, 0 insertions, 84 deletions
diff --git a/dom/html/HTMLMediaElement.h b/dom/html/HTMLMediaElement.h
index af944a318..899e8449a 100644
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -1195,29 +1195,6 @@ protected:
return isPaused;
}
- /**
- * Video has been playing while hidden and, if feature was enabled, would
- * trigger suspending decoder.
- * Used to track hidden-video-decode-suspend telemetry.
- */
- static void VideoDecodeSuspendTimerCallback(nsITimer* aTimer, void* aClosure);
- /**
- * Video is now both: playing and hidden.
- * Used to track hidden-video telemetry.
- */
- void HiddenVideoStart();
- /**
- * Video is not playing anymore and/or has become visible.
- * Used to track hidden-video telemetry.
- */
- void HiddenVideoStop();
-
-#ifdef MOZ_EME
- void ReportEMETelemetry();
-#endif
-
- void ReportTelemetry();
-
// Check the permissions for audiochannel.
bool CheckAudioChannelPermissions(const nsAString& aType);
@@ -1484,9 +1461,6 @@ protected:
// Timer used for updating progress events.
nsCOMPtr<nsITimer> mProgressTimer;
- // Timer used to simulate video-suspend.
- nsCOMPtr<nsITimer> mVideoDecodeSuspendTimer;
-
#ifdef MOZ_EME
// Encrypted Media Extension media keys.
RefPtr<MediaKeys> mMediaKeys;
@@ -1688,65 +1662,7 @@ protected:
// before attaching to the DOM tree.
bool mUnboundFromTree = false;
-public:
- // Helper class to measure times for MSE telemetry stats
- class TimeDurationAccumulator
- {
- public:
- TimeDurationAccumulator()
- : mCount(0)
- {}
- void Start()
- {
- if (IsStarted()) {
- return;
- }
- mStartTime = TimeStamp::Now();
- }
- void Pause()
- {
- if (!IsStarted()) {
- return;
- }
- mSum += (TimeStamp::Now() - mStartTime);
- mCount++;
- mStartTime = TimeStamp();
- }
- bool IsStarted() const
- {
- return !mStartTime.IsNull();
- }
- double Total() const
- {
- if (!IsStarted()) {
- return mSum.ToSeconds();
- }
- // Add current running time until now, but keep it running.
- return (mSum + (TimeStamp::Now() - mStartTime)).ToSeconds();
- }
- uint32_t Count() const
- {
- if (!IsStarted()) {
- return mCount;
- }
- // Count current run in this report, without increasing the stored count.
- return mCount + 1;
- }
- private:
- TimeStamp mStartTime;
- TimeDuration mSum;
- uint32_t mCount;
- };
private:
- // Total time a video has spent playing.
- TimeDurationAccumulator mPlayTime;
-
- // Total time a video has spent playing while hidden.
- TimeDurationAccumulator mHiddenPlayTime;
-
- // Total time a video has (or would have) spent in video-decode-suspend mode.
- TimeDurationAccumulator mVideoDecodeSuspendTime;
-
// Indicates if user has interacted with the element.
// Used to block autoplay when disabled.
bool mHasUserInteraction;