summaryrefslogtreecommitdiffstats
path: root/dom/html/HTMLMediaElement.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2017-12-13 12:07:12 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-24 10:20:45 +0100
commit46ad1199deeaf6ba2db31fb3398d3eaa9abdbb2e (patch)
treebdb1316d0388f03c6b7e4171f56f5bac46c41d87 /dom/html/HTMLMediaElement.h
parent55d03738f9f79e30bab6294b023176d1a65ab5c3 (diff)
downloadUXP-46ad1199deeaf6ba2db31fb3398d3eaa9abdbb2e.tar
UXP-46ad1199deeaf6ba2db31fb3398d3eaa9abdbb2e.tar.gz
UXP-46ad1199deeaf6ba2db31fb3398d3eaa9abdbb2e.tar.lz
UXP-46ad1199deeaf6ba2db31fb3398d3eaa9abdbb2e.tar.xz
UXP-46ad1199deeaf6ba2db31fb3398d3eaa9abdbb2e.zip
Don't build EME-specific subroutines without EME.
- Checks for restricted or encrypted content - Dispatching 'encrypted' events - Dispatching 'key needed' events - HTML Media Element media keys system - EME telemetry - HTML Media Element EME API This is the main bulk for #26, isolating EME-specific code.
Diffstat (limited to 'dom/html/HTMLMediaElement.h')
-rw-r--r--dom/html/HTMLMediaElement.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/dom/html/HTMLMediaElement.h b/dom/html/HTMLMediaElement.h
index d40e9df46..b65049206 100644
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -20,7 +20,9 @@
#include "mozilla/dom/TextTrackManager.h"
#include "mozilla/WeakPtr.h"
#include "MediaDecoder.h"
+#ifdef MOZ_EME
#include "mozilla/dom/MediaKeys.h"
+#endif
#include "mozilla/StateWatching.h"
#include "nsGkAtoms.h"
#include "PrincipalChangeObserver.h"
@@ -630,6 +632,7 @@ public:
// XPCOM MozPreservesPitch() is OK
+#ifdef MOZ_EME
MediaKeys* GetMediaKeys() const;
already_AddRefed<Promise> SetMediaKeys(MediaKeys* mediaKeys,
@@ -651,6 +654,7 @@ public:
already_AddRefed<nsIPrincipal> GetTopLevelPrincipal();
bool ContainsRestrictedContent();
+#endif // MOZ_EME
void CannotDecryptWaitingForKey();
@@ -1198,7 +1202,9 @@ protected:
*/
void HiddenVideoStop();
+#ifdef MOZ_EME
void ReportEMETelemetry();
+#endif
void ReportTelemetry();
@@ -1471,8 +1477,10 @@ protected:
// Timer used to simulate video-suspend.
nsCOMPtr<nsITimer> mVideoDecodeSuspendTimer;
+#ifdef MOZ_EME
// Encrypted Media Extension media keys.
RefPtr<MediaKeys> mMediaKeys;
+#endif
// Stores the time at the start of the current 'played' range.
double mCurrentPlayRangeStart;
@@ -1627,8 +1635,10 @@ protected:
// Listens for waitingForKey events from the owned decoder.
MediaEventListener mWaitingForKeyListener;
+#ifdef MOZ_EME
// Init Data that needs to be sent in 'encrypted' events in MetadataLoaded().
EncryptionInfo mPendingEncryptedInitData;
+#endif
// True if the media's channel's download has been suspended.
Watchable<bool> mDownloadSuspendedByCache;