diff options
Diffstat (limited to 'dom/media/webvtt')
-rw-r--r-- | dom/media/webvtt/TextTrack.cpp | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/dom/media/webvtt/TextTrack.cpp b/dom/media/webvtt/TextTrack.cpp index 7ee9ee63d2..7a5b398d2d 100644 --- a/dom/media/webvtt/TextTrack.cpp +++ b/dom/media/webvtt/TextTrack.cpp @@ -23,20 +23,6 @@ extern mozilla::LazyLogModule gTextTrackLog; namespace mozilla::dom { -static const char* ToStateStr(const TextTrackMode aMode) { - switch (aMode) { - case TextTrackMode::Disabled: - return "DISABLED"; - case TextTrackMode::Hidden: - return "HIDDEN"; - case TextTrackMode::Showing: - return "SHOWING"; - default: - MOZ_ASSERT_UNREACHABLE("Invalid state."); - } - return "Unknown"; -} - static const char* ToReadyStateStr(const TextTrackReadyState aState) { switch (aState) { case TextTrackReadyState::NotLoaded: @@ -53,24 +39,6 @@ static const char* ToReadyStateStr(const TextTrackReadyState aState) { return "Unknown"; } -static const char* ToTextTrackKindStr(const TextTrackKind aKind) { - switch (aKind) { - case TextTrackKind::Subtitles: - return "Subtitles"; - case TextTrackKind::Captions: - return "Captions"; - case TextTrackKind::Descriptions: - return "Descriptions"; - case TextTrackKind::Chapters: - return "Chapters"; - case TextTrackKind::Metadata: - return "Metadata"; - default: - MOZ_ASSERT_UNREACHABLE("Invalid kind."); - } - return "Unknown"; -} - NS_IMPL_CYCLE_COLLECTION_INHERITED(TextTrack, DOMEventTargetHelper, mCueList, mActiveCueList, mTextTrackList, mTrackElement) @@ -129,8 +97,8 @@ void TextTrack::SetMode(TextTrackMode aValue) { if (mMode == aValue) { return; } - WEBVTT_LOG("Set mode=%s for track kind %s", ToStateStr(aValue), - ToTextTrackKindStr(mKind)); + WEBVTT_LOG("Set mode=%s for track kind %s", GetEnumString(aValue).get(), + GetEnumString(mKind).get()); mMode = aValue; HTMLMediaElement* mediaElement = GetMediaElement(); |